v1.0.0-rc6 #18
Workflow file for this run
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
name: "tagged-release" | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
build-id: | |
runs-on: ubuntu-latest | |
outputs: | |
build-id: ${{steps.build-id.outputs.build-id}} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: benjlevesque/[email protected] | |
id: short-sha | |
- id: build-id | |
run: echo "build-id=${{ github.event.release.tag_name }}-${{ steps.short-sha.outputs.sha }}" >> "$GITHUB_OUTPUT" | |
ci: | |
uses: ./.github/workflows/build.yaml | |
needs: build-id | |
with: | |
# note >-, args needs to be strings to be used as inputs | |
# for the reusable build.yaml workflow | |
go-version: >- | |
["1.20.x"] | |
privilege-level: >- | |
["priv"] | |
build-id: "${{needs.build-id.outputs.build-id}}" | |
release: | |
name: "Tagged Release" | |
runs-on: ubuntu-20.04 | |
# needs ci for the cached stacker binary | |
needs: [build-id, ci] | |
steps: | |
- uses: actions/cache@v3 | |
id: restore-build | |
with: | |
path: stacker | |
key: ${{needs.build-id.outputs.build-id}} | |
- if: github.event_name == 'release' && github.event.action == 'published' | |
name: Publish artifacts on releases | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: stacker | |
tag: ${{ github.ref }} | |
overwrite: true | |
file_glob: true |