-
Notifications
You must be signed in to change notification settings - Fork 0
ci: add guarded release tag workflow #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
33807b1
ci: add guarded release tag workflow
dzeusking-dev f6b1edf
fix(windows): add generic runtime recovery trigger
dzeusking-dev 5e78bc0
fix(windows): add role runtime recovery trigger
dzeusking-dev a9b3e91
test(windows): require recovery triggers
dzeusking-dev 36c7f93
docs: document runtime recovery trigger
dzeusking-dev 71963f1
docs: record runtime recovery trigger
dzeusking-dev 48ba21c
ci: allow explicit release dispatch for guarded tags
dzeusking-dev 692f66f
ci: dispatch verified release after guarded tag creation
dzeusking-dev da3af8f
ci: resolve release commit within artifact build step
dzeusking-dev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| name: Create release tag | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| tag: | ||
| description: Immutable semantic release tag, for example v0.2.2 | ||
| required: true | ||
| type: string | ||
|
|
||
| permissions: | ||
| actions: write | ||
| contents: write | ||
|
|
||
| concurrency: | ||
| group: create-release-tag | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| create: | ||
| name: Verify main and create immutable tag | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| environment: | ||
| name: github-release | ||
| steps: | ||
| - name: Check out current main | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| ref: main | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Verify, push tag, and dispatch verified release | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| RELEASE_TAG: ${{ inputs.tag }} | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| [[ "${RELEASE_TAG}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] | ||
| package_version="$(node --input-type=commonjs -p "require('./package.json').version")" | ||
| [[ "${RELEASE_TAG}" == "v${package_version}" ]] | ||
|
|
||
| release_sha="$(git rev-parse HEAD)" | ||
| git fetch --no-tags --force origin main:refs/remotes/origin/main | ||
| [[ "${release_sha}" == "$(git rev-parse refs/remotes/origin/main)" ]] | ||
|
|
||
| if git ls-remote --exit-code --tags origin "refs/tags/${RELEASE_TAG}" >/dev/null 2>&1; then | ||
| echo "Tag ${RELEASE_TAG} already exists." >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| git config user.name "github-actions[bot]" | ||
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
| git tag -a "${RELEASE_TAG}" "${release_sha}" -m "PC FileBridge ${RELEASE_TAG}" | ||
| git push origin "refs/tags/${RELEASE_TAG}" | ||
| gh workflow run release.yml --ref main -f "tag=${RELEASE_TAG}" | ||
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
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
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
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
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.