Update README.md #52
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
name: AutoBuild | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: benjlevesque/short-sha@v2.1 | |
id: short-sha | |
- uses: Swatinem/rust-cache@v2.2.1 | |
- name: Install cargo-lichking | |
uses: baptiste0928/cargo-install@v1.3.1 | |
with: | |
crate: cargo-lichking | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests | |
run: cargo test --verbose | |
- name: Build and package | |
run: sh package.sh | |
- name: Run UPX | |
uses: crazy-max/ghaction-upx@v2.2.0 | |
with: | |
files: package/fs_main.exe | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "fss-${{ steps.short-sha.outputs.sha }}" | |
path: package/ | |
steam-publish: | |
if: github.event_name == 'push' | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: benjlevesque/short-sha@v2.1 | |
id: short-sha | |
- name: Download a Build Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: "fss-${{ steps.short-sha.outputs.sha }}" | |
path: package/ | |
- name: Steam Deploy | |
uses: game-ci/steam-deploy@v3.0.0 | |
with: | |
username: ${{ secrets.STEAM_USERNAME }} | |
configVdf: ${{ secrets.STEAM_CONFIG_VDF }} | |
appId: ${{ secrets.STEAM_APP_ID }} | |
buildDescription: "nightly-${{ steps.short-sha.outputs.sha }}" | |
rootPath: package | |
depot1Path: . | |
releaseBranch: nightly |