-
Notifications
You must be signed in to change notification settings - Fork 10
51 lines (46 loc) · 1.55 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
name: Release
on:
push:
tags:
- v1.*
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: CHECKOUT
uses: actions/checkout@v3
with:
path: osiris
- name: ASSERT VERSIONS
id: versions
working-directory: osiris
run: |
sudo npm install --global --silent @bazel/buildozer
# VERSION_ERLANG_MK="$(sed -ne 's/PROJECT_VERSION = \(.*\)/\1/p' Makefile)"
# if [[ "${{ github.ref_name }}" != "v$VERSION_ERLANG_MK" ]]; then
# echo "Version in Makefile ($VERSION_ERLANG_MK) does not match tag (${{ github.ref_name }})"
# exit 1
# fi
VERSION_BAZEL="$(cat MODULE.bazel | buildozer 'print version' -:%module)"
if [[ "${{ github.ref_name }}" != "v$VERSION_BAZEL" ]]; then
echo "Version in MODULE.bazel ($VERSION_BAZEL) does not match tag (${{ github.ref_name }})"
exit 1
fi
echo "version=$VERSION_BAZEL" | tee -a $GITHUB_OUTPUT
- name: FETCH THE SOURCE ARCHIVE
run: |
curl \
-L \
-o osiris-${{ steps.versions.outputs.version }}.tar.gz \
https://github.com/${{ github.repository }}/archive/${{ github.ref }}.tar.gz
- name: CREATE RELEASE
id: create-release
uses: ncipollo/release-action@v1.12.0
with:
token: ${{ secrets.REPO_SCOPED_TOKEN }}
allowUpdates: true
artifactErrorsFailBuild: true
updateOnlyUnreleased: true
generateReleaseNotes: true
artifacts: >-
osiris-${{ steps.versions.outputs.version }}.tar.gz