-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (40 loc) · 1.21 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
# Upon pushing to the release branch a new tag will be created
# in preparation for the release; then a new tarball will be created;
# and finally a Release will be generated.
#
# Copyright (c) 2022 AlertAvert.com. All rights reserved.
# Author: Marco Massenzio (marco@alertavert.com)
#
name: Release
on:
push:
branches:
- release
env:
AUTHOR: ${{ github.event.pusher.name }}
EMAIL: ${{ github.event.pusher.email }}
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create release tag
run: |
git config user.name "$AUTHOR"
git config user.email "<$EMAIL>"
TAG=$(make version)
git tag -a $TAG -m "Release $TAG"
git push --tags
echo TAG=${TAG} >> $GITHUB_ENV
# The package.sh script used to build the
# tarball requires `pandoc` and `zsh` to be installed.
- name: Build tarball
run: |
sudo apt-get update
sudo apt install -y pandoc zsh
zsh -c 'make package'
- uses: ncipollo/release-action@v1.10.0
with:
tag: ${{ env.TAG }}
generateReleaseNotes: true
artifacts: dist/common-utils-${{ env.TAG }}.tar.gz