-
Notifications
You must be signed in to change notification settings - Fork 11
70 lines (60 loc) · 1.8 KB
/
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
64
65
66
67
68
69
70
name: Release
on:
release:
types:
- published
jobs:
build_addon:
runs-on: windows-2022
steps:
- name: Set VERSION env
run: echo VERSION=${GITHUB_REF:11} >> $GITHUB_ENV
- uses: actions/checkout@v2
- name: Pull Arma3Tools
run: |
echo ${{ secrets.CR_PAT }} | docker login -u ${{ secrets.CR_USER }} --password-stdin ghcr.io
docker pull ghcr.io/armaforces/arma3tools:v2
- name: Build using HEMTT
run: |
docker run -v "$(pwd):c:/workdir" -e CI=$True ghcr.io/armaforces/arma3tools:v2 hemtt release
- uses: actions/upload-artifact@v2
with:
name: hemttout
path: .hemttout/
if-no-files-found: error
retention-days: 1
- uses: actions/upload-artifact@v2
with:
name: releases
path: releases/
if-no-files-found: error
retention-days: 7
release_addon:
runs-on: ubuntu-latest
needs: build_addon
steps:
- name: Set VERSION env
run: echo VERSION=${GITHUB_REF:11} >> $GITHUB_ENV
# Upload to GitHub
- uses: actions/download-artifact@v2
with:
name: releases
path: releases
- uses: softprops/action-gh-release@v1
with:
files: 'releases/afm-${{ env.VERSION }}-*.zip'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Upload to Steam Workshop
- uses: actions/download-artifact@v2
with:
name: hemttout
path: .hemttout
- uses: arma-actions/workshop-upload@v1
with:
itemId: '1934142795' # Id of item to update
contentPath: '.hemttout/release'
changelog: 'https://github.com/ArmaForces/Mods/releases/tag/v${{ env.VERSION }}'
env:
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}