-
Notifications
You must be signed in to change notification settings - Fork 273
59 lines (49 loc) · 1.4 KB
/
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
name: release
run-name: release ${{inputs.version}}
defaults:
run:
shell: bash
on:
workflow_dispatch:
inputs:
version:
description: Release version; e.g. `0.5.19`. We'll create tag `release/${version}`.
required: true
type: string
jobs:
bundle-ucm:
name: build and bundle ucm
uses: ./.github/workflows/bundle-ucm.yaml
with:
ref: ${{github.ref}}
release:
name: create release
runs-on: ubuntu-20.04
needs:
- bundle-ucm
steps:
- name: make download dir
run: mkdir /tmp/ucm
- name: "download artifacts"
uses: actions/download-artifact@v4
with:
path: /tmp/ucm
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
prev_tag="$( \
gh release view \
--repo unisonweb/unison \
--json tagName -t '{{printf .tagName}}' \
)"
if [ -z "$prev_tag" ]; then echo "No previous release found"; exit 1; fi
echo "Creating a release from these artifacts:"
ls -R /tmp/ucm/**/ucm-*.{zip,tar.gz}
gh release create "release/${{inputs.version}}" \
--repo unisonweb/unison \
--target "${{github.sha}}" \
--generate-notes \
--notes-start-tag "${prev_tag}" \
\
/tmp/ucm/**/ucm-*.{zip,tar.gz}