This repository has been archived by the owner on Nov 14, 2024. It is now read-only.
Desync build #35
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
name: Build desync | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "**" | |
jobs: | |
build: | |
name: Validate on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
triplet: x86_64-unknown-linux-gnu | |
- os: windows-latest | |
triplet: x86_64-pc-windows-gnu | |
- os: macos-latest | |
triplet: x86_64-apple-darwin | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout desync | |
uses: actions/checkout@v2 | |
with: | |
repository: V-Sekai/desync | |
fetch-depth: 0 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: "^1.15.6" | |
- uses: actions/cache@v1 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- run: go test | |
- run: go build ./cmd/desync | |
- name: Debug | |
run: | | |
pwd | |
ls -la | |
- name: Rename to triplet scheme | |
id: rename | |
run: | | |
mv ./desync ./desync-${{ matrix.triplet }} | |
echo "::set-output name=path::./desync-${{ matrix.triplet }}" | |
- name: Upload desync binary | |
uses: actions/upload-artifact@v2 | |
with: | |
name: desync-${{ matrix.triplet }} | |
path: ${{ steps.rename.outputs.path }} | |
- name: Download Butler | |
run: | | |
wget https://broth.itch.ovh/butler/linux-amd64/LATEST/archive/default -O butler.zip | |
unzip butler.zip | |
chmod +x butler | |
- name: Upload to Itch.io | |
run: | | |
./butler push ./desync-${{ matrix.triplet }} ${{ secrets.ITCHIO_USER }}/vsekai-kit:${{ matrix.os }} | |
env: | |
BUTLER_API_KEY: ${{ secrets.ITCHIO_API_KEY }} |