Skip to content

Commit

Permalink
chore: fixing release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mdtanker committed Nov 23, 2023
1 parent d040640 commit 2a381b3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 9 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,12 @@ on:
branches:
- main

# cancel any currently running workflows in this same PR
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# determine appropriate version number, update changelog, and create a release commit
release:
name: Semantic Release
runs-on: ubuntu-latest
concurrency: release
permissions:
id-token: write
contents: write
Expand Down
30 changes: 26 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,25 @@ name: release
on:
workflow_dispatch:
release:
types: [released]
types: [published]

# cancel any currently running workflows in this same PR
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# Always build & lint package. Need to re-checkout after semantic-release in case it
# made a commit
build-package:
name: Build & verify package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: hynek/build-and-inspect-python-package@v1

# Upload to Test PyPI.
release-test-pypi:
name: Publish in-dev package to test.pypi.org
Expand All @@ -21,11 +32,15 @@ jobs:
environment:
name: testpypi
url: https://pypi.org/p/invert4geom
needs: [build-package]
steps:
- name: Checkout
uses: actions/checkout@v2
# Download the build package files
- name: Download packages built by build-and-inspect-python-package
with:
fetch-depth: 0
name: Packages
path: dist
uses: actions/download-artifact@v3

- name: Upload package to Test PyPI
with:
repository-url: https://test.pypi.org/legacy/
Expand All @@ -40,7 +55,14 @@ jobs:
environment:
name: pypi
url: https://pypi.org/p/invert4geom
needs: [build-package]
steps:
# Download the build package files
- name: Download packages built by build-and-inspect-python-package
with:
name: Packages
path: dist
uses: actions/download-artifact@v3
- name: Checkout
uses: actions/checkout@v2
with:
Expand Down

0 comments on commit 2a381b3

Please sign in to comment.