Skip to content

Commit

Permalink
Fixing git workflow for release
Browse files Browse the repository at this point in the history
  • Loading branch information
vgmello committed Nov 4, 2023
1 parent ec4a4b7 commit dcde337
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 12 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,3 @@ jobs:
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Publish
run: dotnet publish -c Release -r win-x64 -o output
- uses: kzrnm/get-net-sdk-project-versions-action@v1
id: get-version
with:
proj-path: src/Ellosoft.AwsCredentialsManager/Ellosoft.AwsCredentialsManager.csproj
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3
with:
name: aws-cred-mgr-${{steps.get-version.outputs.version}}${{ github.ref == 'refs/heads/main' && '' || ('-beta-' && github.run_attempt) }}-win.exe
path: output/*.exe
if-no-files-found: error
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: .NET
on:
push:
tags:
- "*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
dotnet-quality: "preview"
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build -c Release --no-restore
- name: Publish
run: dotnet publish -c Release -r win-x64 -o output --no-build
- name: Archive Release
uses: thedoctor0/[email protected]
with:
type: "zip"
path: output/aws-cred-mgr.exe
filename: "aws-cred-mgr-win-x64.zip"
- name: Create Release
uses: softprops/action-gh-release@v1
with:
prerelease: contains(github.ref, 'beta') || contains(github.ref, 'alpha')
files: aws-cred-mgr-win-x64.zip

0 comments on commit dcde337

Please sign in to comment.