Skip to content

Publish

Publish #2

Workflow file for this run

name: Publish
on:
workflow_dispatch:
release:
types:
- published
jobs:
build:
strategy:
matrix:
target: ["win-x64", "linux-x64"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Get Version
uses: kzrnm/[email protected]
id: get-version
with:
proj-path: src/OneWare.Quartus/OneWare.Quartus.csproj
- name: Build ${{ matrix.target }}
run: dotnet build src/OneWare.Quartus/OneWare.Quartus.csproj -c Release -r ${{ matrix.target }} -o publish
- name: Compress ${{ matrix.target }}
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: ../OneWare.QuartusExtension_${{steps.get-version.outputs.version}}_${{ matrix.target }}.zip
directory: ./publish
- uses: actions/upload-artifact@v3
with:
name: OneWare.QuartusExtension_${{ matrix.target }}
if-no-files-found: error
retention-days: 5
path: ./OneWare.QuartusExtension_${{steps.get-version.outputs.version}}_${{ matrix.target }}.zip
release:
runs-on: ubuntu-latest
permissions:
contents: write
needs: [ build ]
steps:
- uses: actions/checkout@v3
- name: Get Version
uses: kzrnm/[email protected]
id: get-version
with:
proj-path: src/OneWare.Quartus/OneWare.Quartus.csproj
- uses: actions/download-artifact@v3
with:
path: ./artifacts
- uses: ncipollo/release-action@v1
with:
artifacts: "artifacts/**/*.zip"
tag: ${{steps.get-version.outputs.version}}
allowUpdates: true