-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (47 loc) · 1.6 KB
/
build_on_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
name: Build on release
on:
release:
types:
- released
- prereleased
jobs:
build:
name: Build
uses: ./.github/workflows/build.yml
upload_release_assets:
name: Attach artifact to release assets
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4.1.4
- name: Prepare output directory
run: |
mkdir ./out
mkdir ./out/japanese
- name: Download artifact
uses: actions/download-artifact@v4.1.4
with:
name: japanese
path: ./out/japanese
- name: Copy necessary file
run: cp ./LICENSE ./out/LICENSE
- name: Create README.txt
run: |
cat << EOF > ./out/README.txt
翻訳データの使用方法や注意事項などは下記のリンクのREADMEをお読みください。
https://github.com/Gakuto1112/Stormworks-JapaneseTranslation/blob/main/.github/README.md
Please read README at the link below for instructions and notes for the translation data.
https://github.com/Gakuto1112/Stormworks-JapaneseTranslation/blob/main/.github/CONTRIBUTING_en.md
EOF
- name: Zip artifact
run: zip -r ./japanese.zip ./
working-directory: ./out
- name: Upload artifact as release asset
run: gh release upload ${TAG_NAME} ./out/japanese.zip --repo ${REPOSITORY}
env:
GH_TOKEN: ${{ github.token }}
TAG_NAME: ${{ github.event.release.tag_name }}
REPOSITORY: ${{ github.repository }}