-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (44 loc) · 1.4 KB
/
update-version.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: update-version
run-name: ${{ github.actor }} is updating version.txt for latest release
on:
# Triggers the workflow on release
release:
types: [released]
workflow_dispatch: # Allow manual trigger workflows
jobs:
fetch:
name: Fetch Version Info
runs-on: ubuntu-latest
outputs:
stable_ver: ${{ steps.check_ver.outputs.stable_ver }}
steps:
- uses: mogeko/latest-version@93e47a995b0d6f6ecad8103a20f8ae177337a85a
id: check_ver
with:
repo: datalogic/oemconfig-s2d-v2
update-release:
name: Update Release Version File
runs-on: ubuntu-latest
needs: fetch
steps:
- uses: actions/checkout@v3
- name: "Find env"
run: |
set | grep GITHUB_ | grep -v GITHUB_TOKEN
zip -r pkg.zip *.txt
- uses: Radioh/[email protected]
with:
filePath: "${{ github.workspace }}/version.txt"
content: '${{ needs.fetch.outputs.stable_ver }}'
- uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "${{ github.workspace }}/version.txt;"
update_latest_release: true
overwrite: true
- name: Git Auto Commit
uses: stefanzweifel/[email protected]
with:
branch: main
file_pattern: '*.txt'