Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
release: | |
types: [created] | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
platform: [linux-native, linux-proton, windows, macos] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get Current Release | |
id: get_current_release | |
uses: joutvhu/get-release@v1 | |
with: | |
debug: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create directories | |
run: | | |
mkdir -p balamod-${{ matrix.platform }} | |
- name: Copy source files into directory (including schemas) | |
run: | | |
cp -r src/commands balamod-${{matrix.platform}} | |
cp src/*.lua balamod-${{matrix.platform}} | |
cp src/*.json balamod-${{matrix.platform}} | |
- name: Generate version file | |
run: | | |
echo "return \"$(git describe --tags --always)\"" > balamod-${{matrix.platform}}/balamod_version.lua | |
- name: Download StackTracePlus.lua | |
run: | | |
curl -LO https://github.com/ignacio/StackTracePlus/raw/master/src/StackTracePlus.lua | |
mv StackTracePlus.lua balamod-${{matrix.platform}}/StackTracePlus.lua | |
- name: Create tarball with balamod files | |
run: | | |
tar czf balamod-${{matrix.platform}}.tar.gz balamod-${{matrix.platform}}/* | |
- name: Upload Release | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.get_current_release.outputs.upload_url }} | |
asset_path: ./balamod-${{matrix.platform}}.tar.gz | |
asset_name: balamod-${{matrix.platform}}.tar.gz | |
asset_content_type: application/gzip |