-
Notifications
You must be signed in to change notification settings - Fork 25
39 lines (31 loc) · 1.33 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
name: release on commit
on:
workflow_run:
workflows: ["check build"]
types: [completed]
jobs:
build-schemes:
runs-on: ubuntu-22.04
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'master' }}
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Get version
shell: bash
run: |
export RELEASE_VERSION=$(cat version.txt).$GITHUB_RUN_NUMBER
echo "version=$RELEASE_VERSION">> $GITHUB_ENV
sed -i "s/\[Unreleased\]/\[$RELEASE_VERSION\]/g" CHANGELOG.md
- name: Build packed schemes
working-directory: ${{runner.workspace}}/Colorer-schemes
run: ./build.sh base.distr-packed -Dpostfix=${{ env.version }}
- name: Build unpacked schemes
working-directory: ${{runner.workspace}}/Colorer-schemes
run: ./build.sh base.distr-unpacked -Dpostfix=${{ env.version }}
- name: Build allpacked schemes
working-directory: ${{runner.workspace}}/Colorer-schemes
run: ./build.sh base.distr-allpacked -Dpostfix=${{ env.version }}
- name: Create release
run: gh release create v${{ env.version }} -t "v${{ env.version }}" ./build/*.zip -n "Colorer base ${{ env.version }}"
env:
GITHUB_TOKEN: ${{secrets.PACKAGES_GITHUB_TOKEN}}