Merge pull request #11 from lrre-foss/dependabot/github_actions/actio… #20
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: CI | |
on: [push] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
platform: [win-x64, linux-x64] | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 7.0 | |
- name: Build | |
run: dotnet publish -r ${{ matrix.platform }} -c Release --no-self-contained -p:PublishDir=../publish/${{ matrix.platform }} | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.platform }} | |
path: publish/${{ matrix.platform }}/* | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
needs: build | |
if: startsWith(github.ref, 'refs/tag/v') | |
steps: | |
- name: Download release artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
path: x64 | |
- name: Rename artifacts | |
run: | | |
mv x64/win-x64.zip toolbox-${{ github.ref_name }}-win-x64.zip | |
mv x64/linux-x64.zip toolbox-${{ github.ref_name }}-linux-x64.zip | |
- name: Create release draft | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: ${{ github.ref_name }} | |
draft: true | |
files: | | |
toolbox-${{ github.ref_name }}-win-x64.zip | |
toolbox-${{ github.ref_name }}-linux-x64.zip |