-
Notifications
You must be signed in to change notification settings - Fork 45
82 lines (75 loc) · 3.09 KB
/
make-release.yaml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Make Release
on:
workflow_dispatch:
jobs:
make-release:
runs-on: ubuntu-latest
outputs:
GITHUB_ONLY_TAG: ${{ steps.sanitize_tag.outputs.GITHUB_ONLY_TAG }}
GITHUB_CHANGELOG: ${{ steps.tag_version.outputs.changelog }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.0
- run: git fetch --prune --unshallow
- name: Bump version and push
id: tag_version
uses: mathieudutour/github-tag-action@fcfbdceb3093f6d85a3b194740f8c6cec632f4e2 # v6.1
with:
github_token: ${{ secrets.BUILDER_PAT }}
dry_run: true
default_bump: minor
default_prerelease_bump: minor
append_to_pre_release_tag: ""
tag_prefix: ""
- name: Sanitize Tag
id: sanitize_tag
run: |
TAG_NAME=$(echo ${{ steps.tag_version.outputs.new_tag }} | cut -d '-' -f 1)
echo "GITHUB_ONLY_TAG=$TAG_NAME" >> $GITHUB_ENV
echo "GITHUB_CHANGELOG=${{ steps.tag_version.outputs.changelog }}" >> $GITHUB_ENV
echo "TAGNAME: $TAG_NAME"
echo "GITHUB_ONLY_TAG=$TAG_NAME" >> $GITHUB_OUTPUT
echo "GITHUB_CHANGELOG=${{ steps.tag_version.outputs.changelog }}" >> $GITHUB_OUTPUT
- name: Create Docker ReleaseNotes
id: create_docker_rn
run: |
echo "## Awesome Docker" > /tmp/docker_rn.md
echo "" >> /tmp/docker_rn.md
echo "" >> /tmp/docker_rn.md
echo "Please find the Latest build [Here](https://hub.docker.com/r/unskript/awesome-runbooks/tags)" >> /tmp/docker_rn.md
echo "" >> /tmp/docker_rn.md
echo "${{ steps.tag_version.outputs.changelog }}" >> /tmp/docker_rn.md
cat /tmp/docker_rn.md
- name: Create a GitHub release
uses: ncipollo/release-action@a2e71bdd4e7dab70ca26a852f29600c98b33153e # v1.12.0
with:
tag: ${{ steps.sanitize_tag.outputs.GITHUB_ONLY_TAG }}
name: Release ${{ steps.sanitize_tag.outputs.GITHUB_ONLY_TAG }}
bodyFile: "/tmp/docker_rn.md"
generateReleaseNotes: true
makeLatest: legacy
omitBody: false
omitBodyDuringUpdate: false
omitDraftDuringUpdate: false
omitName: false
omitNameDuringUpdate: false
omitPrereleaseDuringUpdate: false
removeArtifacts: false
replacesArtifacts: true
skipIfReleaseExists: false
updateOnlyUnreleased: false
build-docker:
needs: make-release
uses: "./.github/workflows/build-and-release-docker.yml"
with:
enabled: true
release_tag: "${{ needs.make-release.outputs.GITHUB_ONLY_TAG }}"
build_number: "${{ needs.make-release.outputs.GITHUB_ONLY_TAG }}"
elyra_branch: "master"
unskript_branch: "master"
celltoolbar_branch: "master"
snippet_branch: "master"
secrets: inherit