Merge pull request #37 from rancher-sandbox/add-rdd-guest #8
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: Release Artifacts | |
| on: | |
| push: | |
| tags: [ 'v*', 'test-v*' ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: Build Artifacts | |
| uses: ./.github/workflows/build.yaml | |
| upload: | |
| name: Create Release | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # Needed to create releases. | |
| steps: | |
| - name: Download artifacts | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| pattern: distro-* | |
| - name: Extract artifacts | |
| run: | | |
| set -o errexit -o nounset -o xtrace | |
| for arch in amd64 arm64; do | |
| mv distro-raw.xz-${arch}/distro.raw.xz distro.${GITHUB_REF_NAME}.${arch}.raw.xz | |
| rmdir distro-raw.xz-${arch}/ | |
| mv distro-qcow2.xz-${arch}/distro.qcow2.xz distro.${GITHUB_REF_NAME}.${arch}.qcow2.xz | |
| rmdir distro-qcow2.xz-${arch}/ | |
| mv distro-tar.xz-${arch}/distro.tar.xz distro.${GITHUB_REF_NAME}.${arch}.tar.xz | |
| rmdir distro-tar.xz-${arch}/ | |
| done | |
| for f in distro.*.{raw.xz,qcow2.xz,tar.xz}; do | |
| sha256sum "$f" > "$f.sha256" | |
| done | |
| - name: Create release | |
| run: >- | |
| gh release create | |
| --title "${GITHUB_REF_NAME#test-}" | |
| --draft | |
| --generate-notes | |
| --verify-tag | |
| --repo ${{ github.repository }} | |
| "${GITHUB_REF_NAME}" | |
| distro.*.{raw.xz,qcow2.xz,tar.xz}{,.sha256} | |
| env: | |
| GH_TOKEN: ${{ github.token }} |