-
-
Notifications
You must be signed in to change notification settings - Fork 10
45 lines (38 loc) · 1.08 KB
/
Create_script_zip.yml
File metadata and controls
45 lines (38 loc) · 1.08 KB
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
name: Create script zip
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: write
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
create-zip:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get version
run: |
if [[ "${{ github.event_name }}" == "release" ]]; then
VERSION="${{ github.event.release.tag_name }}"
else
VERSION=$(gh release list --limit 1 --json tagName --jq '.[0].tagName')
fi
if [[ -z "$VERSION" ]]; then
echo "Error: Could not determine version"
exit 1
fi
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create script zip
run: |
zip "Transcode_${VERSION}_script.zip" transcode_for_x25.sh
- name: Upload to release
run: |
gh release upload ${VERSION} Transcode_${VERSION}_script.zip
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}