Skip to content

Merge pull request #18 from JonasTrampe/release/0.1.496 #74

Merge pull request #18 from JonasTrampe/release/0.1.496

Merge pull request #18 from JonasTrampe/release/0.1.496 #74

Workflow file for this run

name: Automated build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
release:
type: [ released ]
workflow_dispatch:
jobs:
build:
runs-on: [windows-latest]
steps:
- name: Check out
uses: actions/checkout@v4
with:
fetch-depth: 0
filter: tree:0
- name: Setup MSBuild
uses: microsoft/[email protected]
- name: Setup NuGet
uses: NuGet/setup-nuget@v1
- name: Restore NuGet packages
run: nuget restore ChummerGenSR4.sln
- uses: benjlevesque/[email protected]
id: short-sha
with:
length: 6
- name: run minver
id: version
uses: Stelzi79/[email protected]
with:
auto-increment: patch
build-metadata: ${{ steps.short-sha.outputs.sha }}
default-pre-release-phase: beta
minimum-major-minor: 0.1
tag-prefix: v
- name: Set project versions
id: update
uses: vers-one/[email protected]
with:
file: |
"**/AssemblyInfo.cs"
version: ${{ steps.version.outputs.version }}
- name: Build the solution
run: msbuild ChummerGenSR4.sln /p:Configuration=Release
- name: Zip Release
uses: TheDoctor0/[email protected]
with:
type: 'zip'
filename: "ChummerGenSR4-${{ steps.version.outputs.version }}.zip"
path: "bin/*"
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: "ChummerGenSR4-${{ steps.version.outputs.version }}"
path: "ChummerGenSR4-${{ steps.version.outputs.version }}.zip"
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
with:
fetch-depth: 0
filter: tree:0
- uses: benjlevesque/[email protected]
id: short-sha
with:
length: 6
- name: run minver
id: version
uses: Stelzi79/[email protected]
with:
auto-increment: patch
build-metadata: ${{ steps.short-sha.outputs.sha }}
default-pre-release-phase: beta
minimum-major-minor: 0.1
tag-prefix: v
- name: Download release version
uses: actions/[email protected]
with:
name: "ChummerGenSR4-${{ steps.version.outputs.version }}"
- name: Upload to release
uses: JasonEtco/upload-to-release@master
if: github.event_name == 'release'
with:
args: ./ChummerGenSR4-${{steps.version.outputs.version}}.zip application/zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}