Create Release #7
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: Create Release | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| generate-tag: | |
| if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) | |
| runs-on: namespace-profile-ubuntu-small | |
| outputs: | |
| tag_name: ${{ steps.tag.outputs.name }} | |
| steps: | |
| - name: Generate tag name | |
| id: tag | |
| run: echo "name=v$(date -u +'%Y-%m-%d-%H-%M-%S')" >> "$GITHUB_OUTPUT" | |
| build: | |
| needs: generate-tag | |
| uses: ./.github/workflows/build_release.yml | |
| secrets: inherit | |
| with: | |
| docker_tag: ${{ needs.generate-tag.outputs.tag_name }} | |
| release: | |
| needs: [generate-tag, build] | |
| runs-on: namespace-profile-ubuntu-small | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download artifacts | |
| uses: namespace-actions/download-artifact@v1 | |
| with: | |
| # Only download release artifacts, not Docker image metadata. | |
| pattern: oz-agent-worker-* | |
| path: artifacts | |
| - name: Create release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ needs.generate-tag.outputs.tag_name }} | |
| target_commitish: ${{ github.sha }} | |
| generate_release_notes: true | |
| append_body: true | |
| body: "**Docker image:** `${{ needs.build.outputs.image }}`" | |
| files: artifacts/**/* |