Add targeted restore-token reset control #116
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ["v*"] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - run: make test | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Build doubletake | |
| run: make doubletake-release | |
| - name: Build doubletake-ctl | |
| run: make doubletake-ctl-release | |
| - name: Build doubletake-test-receiver | |
| run: make doubletake-test-receiver-release | |
| - name: Bundle manpages | |
| run: make manpages-release | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-assets | |
| path: | | |
| doubletake | |
| doubletake-ctl | |
| doubletake-test-receiver | |
| doubletake-manpages.tar.gz | |
| release: | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| needs: build | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: release-assets | |
| - name: Extract release notes from tag | |
| id: notes | |
| run: | | |
| # Re-fetch the tag to ensure the annotated tag object is present | |
| git fetch origin tag "${GITHUB_REF_NAME}" --force --no-tags | |
| NOTES=$(git tag -l --format='%(contents)' "${GITHUB_REF_NAME}") | |
| if [ -z "$NOTES" ]; then | |
| NOTES=$(git log -1 --format='%B' "${GITHUB_REF_NAME}") | |
| fi | |
| { | |
| echo 'RELEASE_NOTES<<EOF' | |
| echo "$NOTES" | |
| echo 'EOF' | |
| } >> "$GITHUB_OUTPUT" | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| body: ${{ steps.notes.outputs.RELEASE_NOTES }} | |
| files: | | |
| doubletake | |
| doubletake-ctl | |
| doubletake-test-receiver | |
| doubletake-manpages.tar.gz |