-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (63 loc) · 2.13 KB
/
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
70
71
72
73
name: build-and-release
on:
push:
tags:
- '*'
jobs:
build:
name: Build and create a release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
fetch-depth: 0
fetch-tags: true
- name: Set TAG variables
id: tags_variables
run: |
set -x
TAG_CURRENT=$(git describe --abbrev=0 --tags ${{ github.ref }})
echo "TAG_CURRENT=$TAG_CURRENT" >> "$GITHUB_ENV"
echo "CHANGELOG_MESSAGE<<EOF" >> $GITHUB_ENV
sed -nzE "s/^.*## $TAG_CURRENT([^#]*).*$/\1/p" CHANGELOG.md | sed -e '/./,$!d' -e :a -e '/^\n*$/{$d;N;ba' -e '}' >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Build
run: |
./scripts/build_webvaults.sh
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.TAG_CURRENT }}
release_name: ${{ env.TAG_CURRENT }}
body: |
${{ env.CHANGELOG_MESSAGE }}
:robot: Built by [release.yml](.github/workflows/release.yml) :robot:
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-button
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./oidc_button_web_vault.tar.gz
asset_name: oidc_button_web_vault.tar.gz
asset_content_type: application/gzip
- name: Upload Release Asset
id: upload-release-override
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./oidc_override_web_vault.tar.gz
asset_name: oidc_override_web_vault.tar.gz
asset_content_type: application/gzip