Skip to content

Commit

Permalink
Merge pull request natcap#1496 from emlys/feature/1493
Browse files Browse the repository at this point in the history
enable manual trigger for autorelease part 2 natcap#1493
  • Loading branch information
davemfish authored Jan 4, 2024
2 parents 381b5e5 + 5da9332 commit 23fd4a8
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/release-part-2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ on:
branches:
- main

workflow_dispatch:
inputs:
version:
required: true
type: string

env:
GITHUB_TOKEN: ${{ secrets.AUTORELEASE_BOT_PAT }}

Expand All @@ -29,7 +35,8 @@ jobs:

publish_release:
# run this job if a PR was merged from an autorelease branch into main
if: startsWith(github.head_ref, 'autorelease') && github.event.pull_request.merged == true
# or if manually triggered, github.head_ref is undefined
if: ${{ ! github.head_ref || (startsWith(github.head_ref, 'autorelease') && github.event.pull_request.merged == true) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -38,8 +45,13 @@ jobs:
run: pip install twine

- name: Extract version from autorelease branch name
if: ${{ github.head_ref }}
run: echo "VERSION=$(echo ${{ github.head_ref }} | cut -c 13-)" >> $GITHUB_ENV

- name: Get version from manual trigger input
if: ${{ ! github.head_ref }}
run: echo "VERSION=${{ inputs.version }}" >> $GITHUB_ENV

- name: Find actions run for the $VERSION tag
run: |
echo "RUN_ID=$( \
Expand All @@ -58,8 +70,6 @@ jobs:
# move the artifacts out of the folders
mv artifacts/*/* artifacts
rm -rf artifacts/Wheel*
# verify that all 6 wheels are there
if [ `find artifacts/* | wc -l` -ne 6 ]; then exit 1; fi
# download each artifact separately so that the command will fail if any is missing
for artifact in Workbench-Windows-binary \
Expand Down

0 comments on commit 23fd4a8

Please sign in to comment.