Skip to content

change release in action to use softprops implementation #4

change release in action to use softprops implementation

change release in action to use softprops implementation #4

Workflow file for this run

name: Build and Release
on:
push:
tags:
- 'v*.*.*' # Trigger on version tags
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Install dependencies
run: dotnet restore AwsServiceAuthenticator.sln
- name: Build
run: dotnet build --configuration Release AwsServiceAuthenticator.sln
- name: Publish
run: dotnet publish --configuration Release --output ./publish AwsServiceAuthenticator.sln
- name: Archive release files
uses: actions/upload-artifact@v3
with:
name: release-${{ matrix.os }}
path: ./publish
reate_release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Download build artifacts (Linux)
uses: actions/download-artifact@v3
with:
name: release-ubuntu-latest
path: ./publish/ubuntu
- name: Download build artifacts (Windows)
uses: actions/download-artifact@v3
with:
name: release-windows-latest
path: ./publish/windows
- name: Download build artifacts (macOS)
uses: actions/download-artifact@v3
with:
name: release-macos-latest
path: ./publish/macos
- name: Create a release
id: create_release
uses: softprops/action-gh-release@v1
with:
files: |
./publish/ubuntu/*
./publish/windows/*
./publish/macos/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}