-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (52 loc) · 1.98 KB
/
create_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
name: Create LABDOS Release
on:
workflow_dispatch:
jobs:
build:
uses: ./.github/workflows/build_fw.yml
with:
build_type: R
secrets: inherit
release:
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: LABDOS01A
- name: Gen Release Name and preare assets
id: gen_release_name
run: |
MAJOR=`cat fw/LABDOS/nextversion|grep MAJOR|cut -d ' ' -f 2`
MINOR=`cat fw/LABDOS/nextversion|grep MINOR|cut -d ' ' -f 2`
NEXTRELEASE=`cat fw/LABDOS/nextversion|grep RELEASE|cut -d ' ' -f 2`
NEXTBUILD=`cat fw/${{ matrix.type }}/nextversion|grep BUILD|cut -d ' ' -f 2`
RELEASE=`echo $NEXTRELEASE"-1"|bc`
BUILD=`echo $NEXTBUILD"-1"|bc`
echo "tagname=LABDOS-${MAJOR}.${MINOR}.${RELEASE}-${BUILD}" >> $GITHUB_OUTPUT
- name: Create TAG
run: |
echo "${{ steps.gen_release_name.outputs.tagname }}"
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git tag -a ${{ steps.gen_release_name.outputs.tagname }} -m "Release ${{ steps.gen_release_name.outputs.tagname }}"
git push origin ${{ steps.gen_release_name.outputs.tagname }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.gen_release_name.outputs.tagname }}
release_name: Release ${{ steps.gen_release_name.outputs.tagname }}
draft: false
prerelease: false
- name: Upload Release Assets
id: upload-release-assets
uses: dwenegar/upload-release-assets@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ steps.create_release.outputs.id }}
assets_path: fw/build/*.hex