Skip to content

Update workflow to work with PRs. #1

Update workflow to work with PRs.

Update workflow to work with PRs. #1

Workflow file for this run

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