Skip to content

Update README.md

Update README.md #29

Workflow file for this run

name: Push
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
if: ${{ !contains(github.event.head_commit.message, 'dev') }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
go: ["1.21.4"]
goos: [linux, windows]
goarch: [amd64, arm64]
steps:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Code checkout
uses: actions/checkout@v4
- name: go mod download
env:
CGO_ENABLED: 0
run: |
go mod download
- name: Build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: 0
run: |
go build -o dist/PalworldServerConfigParser-${{ matrix.goos }}-${{ matrix.goarch }}
if [ "${{ matrix.goos }}" = "windows" ]; then
mv dist/PalworldServerConfigParser-${{ matrix.goos }}-${{ matrix.goarch }} dist/PalworldServerConfigParser-${{ matrix.goos }}-${{ matrix.goarch }}.exe
fi
chmod 755 dist/*
- uses: actions/upload-artifact@v4
if: matrix.goos == 'linux'
with:
name: PalworldServerConfigParser-${{ matrix.goos }}-${{ matrix.goarch }}.zip
path: dist/PalworldServerConfigParser-${{ matrix.goos }}-${{ matrix.goarch }}
- uses: actions/upload-artifact@v4
if: matrix.goos == 'windows'
with:
name: PalworldServerConfigParser-${{ matrix.goos }}-${{ matrix.goarch }}.exe.zip
path: dist/PalworldServerConfigParser-${{ matrix.goos }}-${{ matrix.goarch }}.exe
# release:
# name: Create Release
# runs-on: ubuntu-20.04
# if: startsWith(github.event.head_commit.message, 'Release:')
# steps:
# - uses: actions/checkout@v4
# - name: Extract tag from commit message
# id: extract_tag
# run: |
# echo "::set-output name=tag::$(echo ${{ github.event.head_commit.message }} | grep -oP 'Release: \K(.*)')"
# - name: Create Release
# uses: softprops/action-gh-release@v1
# with:
# files: |
# 'dist/PalworldServerConfigParser-linux-amd64'
# 'dist/PalworldServerConfigParser-linux-arm64'
# 'dist/PalworldServerConfigParser-windows-amd64.exe'
# 'dist/PalworldServerConfigParser-windows-arm64.exe'
# tag_name: v${{ steps.extract_tag.outputs.tag }}
# title: ${{ steps.extract_tag.outputs.tag }}