-
Notifications
You must be signed in to change notification settings - Fork 47
69 lines (59 loc) · 1.89 KB
/
publish-draft-release.yml
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
name: Release - Publish draft
on:
push:
tags:
# Catches only v1.2.3 (-dev,-rc1 etc won't be released as SDK)
- v[0-9]+.[0-9]+.[0-9]+
jobs:
publish-draft-release:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
fetch-depth: 0
path: worker
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.0
- name: Download srtool json output
uses: actions/download-artifact@v3
- name: Prepare tooling
run: |
cd worker/scripts/changelog
gem install bundler changelogerator:0.9.1
bundle install
changelogerator --help
URL=https://github.com/chevdor/tera-cli/releases/download/v0.2.1/tera-cli_linux_amd64.deb
wget $URL -O tera.deb
sudo dpkg -i tera.deb
tera --version
- name: Generate release notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEBUG: 1
PRE_RELEASE: ${{ github.event.inputs.pre_release }}
run: |
find ${{env.GITHUB_WORKSPACE}} -type f -name "*_srtool_output.json"
cd worker/scripts/changelog
./bin/changelog ${GITHUB_REF}
ls -al release-notes.md
ls -al context.json
- name: Archive artifact context.json
uses: actions/upload-artifact@v3
with:
name: release-notes-context
path: |
worker/scripts/changelog/context.json
**/*_srtool_output.json
- name: Create draft release
id: create-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: SDK ${{ github.ref }}
body_path: ./worker/scripts/changelog/release-notes.md
draft: true