-
Notifications
You must be signed in to change notification settings - Fork 63
62 lines (54 loc) · 1.9 KB
/
push.yaml
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
name: push
on: [ push ]
jobs:
push-build:
uses: ./.github/workflows/build.yaml
secrets:
BINARY_ARCHIVE_DEPLOY_KEY: ${{ secrets.BINARY_ARCHIVE_DEPLOY_KEY }}
with:
ref: ${{ github.ref }}
upload-artifact: true
push-release:
needs: [push-build]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v4
- name: Read Versions
run: |
HKV=$(cat ./hollowknight.version)
echo "HK_VERSION=$HKV" >> $GITHUB_ENV
APIV=$(cat ./moddingapi.version)
echo "API_VERSION=$APIV" >> $GITHUB_ENV
- uses: actions/download-artifact@v4
with:
path: ./artifacts
- name: Zip Artifacts
run: |
zip -jr moddingapi.${{ env.API_VERSION }}.windows.zip ./artifacts/build.windows/*
zip -jr moddingapi.${{ env.API_VERSION }}.macos.zip ./artifacts/build.macos/*
zip -jr moddingapi.${{ env.API_VERSION }}.linux.zip ./artifacts/build.linux/*
- uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install Node Dependencies
run: |
npm install handlebars
- name: Create Release Notes
id: create-relnotes
uses: actions/github-script@v7
env:
CHANGELOG: ${{ github.event.head_commit.message }}
with:
result-encoding: string
script: |
const script = require("./.github/workflows/create_relnotes.js");
return await script();
- name: Create Release
uses: softprops/action-gh-release@v2
with:
body: ${{ steps.create-relnotes.outputs.result }}
files: |
./moddingapi.${{ env.API_VERSION }}.windows.zip
./moddingapi.${{ env.API_VERSION }}.macos.zip
./moddingapi.${{ env.API_VERSION }}.linux.zip