You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.3 KiB
50 lines
1.3 KiB
name: Release |
|
|
|
on: |
|
push: |
|
tags: |
|
- 'v[0-9]+.[0-9]+.[0-9]+' |
|
branches: [ main ] |
|
|
|
jobs: |
|
release: |
|
if: github.repository == 'ionite34/StabilityMatrix' |
|
runs-on: windows-latest |
|
|
|
steps: |
|
- uses: actions/checkout@v3 |
|
|
|
- uses: olegtarasov/get-tag@v2.1.2 |
|
id: tag_name |
|
with: |
|
tagRegex: "v(.*)" |
|
|
|
- name: Set Tag |
|
with: |
|
tag_name: ${{ steps.tag_name.outputs.tag }} |
|
run: echo "RELEASE_VERSION=${GIT_TAG_NAME}.0" >> $GITHUB_ENV |
|
|
|
- name: Remove old artifacts |
|
uses: c-hive/gha-remove-artifacts@v1 |
|
with: |
|
age: '90 seconds' |
|
skip-tags: false |
|
|
|
- name: Set up .NET |
|
uses: actions/setup-dotnet@v3 |
|
with: |
|
dotnet-version: '6.0.x' |
|
|
|
- name: Install dependencies |
|
run: dotnet restore -p:PublishReadyToRun=true |
|
|
|
- name: Build |
|
run: dotnet publish ./StabilityMatrix/StabilityMatrix.csproj -o out -c Release -r win-x64 \ |
|
-p:Version=${RELEASE_VERSION} -p:FileVersion=${RELEASE_VERSION} -p:AssemblyVersion=${RELEASE_VERSION} \ |
|
-p:PublishReadyToRun=true -p:PublishSingleFile=true --self-contained true |
|
|
|
- name: Upload Artifact |
|
uses: actions/upload-artifact@v2 |
|
with: |
|
name: StabilityMatrix |
|
path: ./out/StabilityMatrix.exe
|
|
|