-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (43 loc) · 1.38 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
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 Latest Release
runs-on: ubuntu-latest
outputs:
tag_name: ${{ steps.fetch-latest-release.outputs.tag_name }}
steps:
- uses: CityOfLosAngeles/[email protected]
id: fetch-latest-release
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
update-release:
name: Update Relase 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.tag_name }}'
- 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:
file_pattern: '*.txt'