[WIP] Add Github Actions #1
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: Release | |
on: | |
pull_request: | |
types: [opened, reopened, ready_for_review, synchronize] | |
push: | |
branches: [master] | |
tags-ignore: ["**"] | |
jobs: | |
version: | |
name: Version | |
concurrency: tagging | |
if: ${{ github.ref == 'refs/heads/master' }} | |
runs-on: ubuntu-latest | |
outputs: | |
semver_tag: ${{ steps.semver-tag.outputs.semver_tag }} | |
ancestor_tag: ${{ steps.semver-tag.outputs.ancestor_tag }} | |
is_prerelease: ${{ steps.semver-tag.outputs.is_prerelease }} | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- | |
name: Calculate semver tag | |
id: semver-tag | |
uses: gandarez/semver-action@master | |
with: | |
branching_model: trunk-based | |
prefix: v | |
debug: true | |
- name: Create tag | |
uses: actions/github-script@v7 | |
with: | |
github-token: ${{ github.token }} | |
script: | | |
github.rest.git.createRef({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
ref: "refs/tags/${{ steps.semver-tag.outputs.semver_tag }}", | |
sha: context.sha | |
}) | |
build-dev14: | |
name: Build Dev14 | |
runs-on: windows-2019 | |
needs: [version] | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
- | |
name: Setup MSBuild | |
uses: microsoft/setup-msbuild@v1 | |
- | |
name: Setup NuGet | |
uses: NuGet/setup-nuget@v1 | |
- | |
name: Restore NuGet packages | |
run: nuget restore Dev14/Dev14.csproj | |
- | |
name: Build Dev14 for Release | |
run: msbuild Dev14/Dev14.csproj -property:Configuration=Release -property:platform="AnyCPU" |