forked from sqreen/PyMiniRacer
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch from tags to branches for releases
- Loading branch information
Showing
2 changed files
with
39 additions
and
21 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,8 @@ on: | |
pull_request: {} | ||
# For releases: | ||
push: | ||
tags: | ||
- v* | ||
branches: | ||
- 'release/*' | ||
|
||
concurrency: | ||
group: build-${{ github.head_ref }} | ||
|
@@ -68,8 +68,8 @@ jobs: | |
# releases. | ||
# For more info on this GitHub Actions hack, see: | ||
# https://stackoverflow.com/questions/65384420/how-do-i-make-a-github-action-matrix-element-conditional#answer-73822998 | ||
- image: ${{ !startsWith(github.ref, 'refs/tags') && 'arm64v8/debian:bullseye' }} | ||
- image: ${{ !startsWith(github.ref, 'refs/tags') && 'arm64v8/alpine:3.19' }} | ||
- image: ${{ !startsWith(github.ref, 'refs/heads/release/') && 'arm64v8/debian:bullseye' }} | ||
- image: ${{ !startsWith(github.ref, 'refs/heads/release/') && 'arm64v8/alpine:3.19' }} | ||
|
||
steps: | ||
- name: Configure git | ||
|
@@ -83,7 +83,7 @@ jobs: | |
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected] | ||
# For security reasons, only use sccache on releases: | ||
if: ${{ startsWith(github.ref, 'refs/tags') }} | ||
if: ${{ startsWith(github.ref, 'refs/heads/release/') }} | ||
|
||
- uses: uraimo/run-on-arch-action@v2 | ||
name: Build wheel | ||
|
@@ -323,7 +323,7 @@ jobs: | |
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected] | ||
# For security reasons, only use sccache on releases: | ||
if: ${{ startsWith(github.ref, 'refs/tags') }} | ||
if: ${{ startsWith(github.ref, 'refs/heads/release') }} | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
|
@@ -351,24 +351,35 @@ jobs: | |
release: | ||
name: Create GitHub release | ||
if: startsWith(github.ref, 'refs/tags') | ||
if: startsWith(github.ref, 'refs/heads/release') | ||
needs: | ||
- linux-wheels | ||
- non-linux-wheels | ||
# TODO add back | ||
# - linux-wheels | ||
# - non-linux-wheels | ||
- sdist | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/download-artifact@v3 | ||
|
||
- name: Compute release version | ||
run: | | ||
VERSION=${GITHUB_REF_NAME#release/} | ||
echo Version: $VERSION | ||
echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
- name: Make release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: "wheels/*,sdist/*" | ||
commit: ${{ github.ref }} | ||
tag: ${{ env.VERSION }} | ||
|
||
publish: | ||
name: Upload release to PyPI | ||
if: startsWith(github.ref, 'refs/tags') | ||
# TODO swap back | ||
if: false | ||
# if: startsWith(github.ref, 'refs/heads/release') | ||
needs: | ||
- release | ||
runs-on: ubuntu-latest | ||
|
This file contains 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