Move configuration section up #59
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: Release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
name: Semantic Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Checkout sources' | |
uses: actions/checkout@v3 | |
- name: 'Setup NodeJS' | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- name: 'Force HTTPS' | |
run: git config --global url."https://github".insteadOf ssh://git@github | |
- name: 'Install dependencies' | |
run: yarn install | |
- name: 'Compile TypeScript' | |
run: yarn build | |
- name: 'Semantic Release' | |
uses: cycjimmy/semantic-release-action@v3 | |
id: semantic | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: 'Create distribution build' | |
if: steps.semantic.outputs.new_release_published == 'true' | |
run: yarn dist:build | |
- name: 'Create Linux binaries' | |
if: steps.semantic.outputs.new_release_published == 'true' | |
run: yarn dist:pkg:linux | |
- name: 'Create Windows binary' | |
if: steps.semantic.outputs.new_release_published == 'true' | |
run: yarn dist:pkg:windows | |
- name: 'Create macOS binary' | |
if: steps.semantic.outputs.new_release_published == 'true' | |
run: yarn dist:pkg:macos | |
- name: 'Bundle macOS binary' | |
if: steps.semantic.outputs.new_release_published == 'true' | |
run: yarn dist:bundle:macos | |
- name: 'Add assets to release' | |
if: steps.semantic.outputs.new_release_published == 'true' | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ steps.semantic.outputs.new_release_version }} | |
files: | | |
binaries/mudslide-linuxstatic-x64 | |
binaries/mudslide-linuxstatic-arm64 | |
binaries/mudslide.exe | |
binaries/mudslide-macos.tgz |