Skip to content

Commit

Permalink
ci: add github release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
hrz6976 committed Jun 27, 2024
1 parent a2c23ec commit 1af0a46
Showing 1 changed file with 46 additions and 4 deletions.
50 changes: 46 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,59 @@ jobs:
with:
path: dist

- name: Download sdist
- name: Move wheels to dist
run: |
mv dist/wheels/*.whl dist
mv dist/sdist/*.tar.gz dist
rm -r dist/wheels
rm -r dist/sdist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1


release:
name: wheels
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Download wheels
uses: actions/download-artifact@v2
with:
path: dist

- name: Move everything to dist
- name: Move wheels to dist
run: |
mv dist/wheels/*.whl dist
mv dist/sdist/*.tar.gz dist
rm -r dist/wheels
rm -r dist/sdist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '18'

- name: Generate Changelog
run: |
npm install -g conventional-changelog-cli
conventional-changelog -p angular -i dist/CHANGELOG.md -s
- name: Create a new Release
uses: ncipollo/release-action@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# https://github.com/ncipollo/release-action for the full list of arguments
artifacts: dist/*.whl,dist/*.tar.gz
draft: true # generate a draft release
generateReleaseNotes: false
bodyFile: dist/CHANGELOG.md
# generate a pre-release if 'pre', 'rc', or 'beta' is in the tag name, or triggered manually
prerelease: ${{ github.event_name == 'workflow_dispatch' || contains(github.ref, 'beta') || contains(github.ref, 'rc') || contains(github.ref, 'pre') }}
# use the tag name if it's a tag, otherwise use the commit hash
continue-on-error: true

0 comments on commit 1af0a46

Please sign in to comment.