Skip to content

更新对应的版本文件 #136

更新对应的版本文件

更新对应的版本文件 #136

Workflow file for this run

name: Build
on:
push:
tags:
- 'v*'
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
mode:
- std
- startup
lang:
- sc
- tc
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- name: install spruce
run: |
id
wget -nv https://github.com/geofffranks/spruce/releases/download/v1.29.0/spruce-linux-amd64
chmod a+x spruce-linux-amd64
mv spruce-linux-amd64 ~/go/bin/spruce
- name: build
env:
MODE: ${{ matrix.mode }}
LANG: ${{ matrix.lang }}
run: |
make build MODE=$MODE LANG_TYPE=$LANG
echo "VERSION=$(git describe --tags)" >> $GITHUB_ENV
- name: publish
env:
MODE: ${{ matrix.mode }}
LANG: ${{ matrix.lang }}
run: |
make publish MODE=$MODE LANG_TYPE=$LANG
mkdir -p build/mods/wing
cp -r wing.mpq build/mods/wing
cd build
zip -r wing-$MODE-$LANG-$VERSION.zip mods
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
path: build/wing-*.zip
if-no-files-found: error
publish:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v3
with:
path: './'
- name: Release
if: startsWith(github.ref, 'refs/tags/v')
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
files: |
artifact/*.zip