-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (40 loc) · 1.28 KB
/
create_release.yml
File metadata and controls
45 lines (40 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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/**/*