Skip to content
This repository has been archived by the owner on Feb 11, 2025. It is now read-only.

Commit

Permalink
split publish to a separate workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hollandjg committed Jul 19, 2024
1 parent 9191efb commit 43a9065
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 23 deletions.
25 changes: 2 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ on:
merge_group:
types: [ checks_requested ]
workflow_dispatch:
release:
types:
- published
workflow_call:

jobs:
build:
Expand Down Expand Up @@ -36,23 +34,4 @@ jobs:
path: dist

- name: validate SDist & wheel
run: pipx run twine check dist/*

publish:
if: ${{ github.event.release.published }}
needs: [ build, check ]
runs-on: ubuntu-latest
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
repository-url: https://test.pypi.org/legacy/
run: pipx run twine check dist/*
28 changes: 28 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
on:
workflow_dispatch:
release:
types:
- published

jobs:

build:
uses: brown-ccv/social-norms-trees/.github/workflows/build.yml

publish:
needs: [ build, check ]
runs-on: ubuntu-latest
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
repository-url: https://test.pypi.org/legacy/

0 comments on commit 43a9065

Please sign in to comment.