Skip to content

Commit

Permalink
Rework how releases are uploaded
Browse files Browse the repository at this point in the history
  • Loading branch information
pradyunsg committed Oct 9, 2021
1 parent d8add3b commit 0ea552a
Showing 1 changed file with 7 additions and 28 deletions.
35 changes: 7 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
tags:
- "*"

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -46,36 +49,12 @@ jobs:
with:
name: wheel

- name: Create the GitHub release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
prerelease: true

- name: Upload sdist to GitHub
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/furo-*.tar.gz
asset_content_type: application/x-gzip

- name: Upload wheel to GitHub
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
uses: softprops/action-gh-release@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/furo-*-py3-none-any.whl
asset_content_type: application/zip
files: dist/*

- name: Upload both to TestPyPI
- name: Upload assets
uses: pypa/[email protected]
with:
user: __token__
Expand Down

0 comments on commit 0ea552a

Please sign in to comment.