Version 1.0.18.0 #54
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: MacroMate Build | |
on: | |
push: | |
tags: | |
- "v*.*.*.*" | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
RELEASE_VERSION: '0.0.0.0' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v7 | |
- name: Cache Nix | |
uses: DeterminateSystems/magic-nix-cache-action@v2 | |
- name: Build | |
run: nix develop --command dotnet build --configuration Release /p:Platform=x64 | |
- name: Create Alpha Release | |
run: nix develop --command .github/scripts/prepare-alpha.sh | |
- name: Upload Alpha Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: MacroMate-release-${{ github.sha }} | |
path: | | |
MacroMate/bin/x64/ReleaseAlpha | |
!MacroMate/bin/x64/ReleaseAlpha/MacroMateAlpha.zip | |
- name: Query Release Version | |
run: | | |
echo "RELEASE_VERSION=$(.github/scripts/release-version.sh)" >> "$GITHUB_ENV" | |
- name: Create Release | |
if: ${{ env.RELEASE_VERSION != '0.0.0.0' }} | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: MacroMate ${{ env.RELEASE_VERSION }} | |
tag_name: v${{ env.RELEASE_VERSION }} | |
files: | | |
./MacroMate/bin/x64/ReleaseAlpha/MacroMateAlpha.zip | |
- name: Update repo.json | |
if: ${{ env.RELEASE_VERSION != '0.0.0.0' }} | |
run: | | |
nix develop --command .github/scripts/update-repo-json.sh | |
git config --global user.name "Actions User" | |
git config --global user.email "[email protected]" | |
git fetch origin master && git checkout master | |
git add repo.json | |
git commit -m "Update repo.json for v${{ env.RELEASE_VERSION }}" || true | |
git push origin master || true |