Correct package download step in release. #14
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Create Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: {} | |
| jobs: | |
| ci: | |
| name: CI | |
| permissions: | |
| contents: read | |
| id-token: write | |
| attestations: write | |
| uses: ./.github/workflows/ci.yml | |
| with: | |
| attest-package: "true" | |
| release: | |
| name: Create Release | |
| needs: [ci] | |
| # This has to be run on macOS, because rubicon tries to load the Foundation library | |
| runs-on: macOS-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Set build variables | |
| run: | | |
| echo "VERSION=${GITHUB_REF_NAME#v}" | tee -a $GITHUB_ENV | |
| - name: Get packages | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| pattern: "dist-*" | |
| merge-multiple: true | |
| path: dist | |
| - name: Create Release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GH_REPO: ${{ github.repository }} | |
| shell: bash | |
| run: gh release create "$GITHUB_REF_NAME" --draft --title "$VERSION" dist/* | |
| test-publish: | |
| name: Publish test package | |
| needs: [ci, release] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - name: Get packages | |
| uses: dsaltares/fetch-gh-release-asset@aa2ab1243d6e0d5b405b973c89fa4d06a2d0fff7 # 1.1.2 | |
| with: | |
| version: tags/${{ github.ref_name }} | |
| # This next line is *not* a bash filename expansion - it's a regex. | |
| # We need to match all files that start with std-nslog or | |
| # std_nslog, but not the "Source code" zip/tarball. | |
| file: std.* | |
| regex: true | |
| target: dist/ | |
| - name: Publish release to Test PyPI | |
| uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1 | |
| with: | |
| repository-url: https://test.pypi.org/legacy/ |