Skip to content

Release

Release #8

Workflow file for this run

name: Release
on:
push:
tags:
- "*"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
matrix:
rid: [win-x64, win-arm64, linux-x64, linux-arm, osx-x64, osx-arm64]
name: Build for ${{ matrix.rid }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v3
with:
dotnet-version: "9.x"
- name: publish app for ${{ matrix.rid }}
run: dotnet publish src/Lazvard.Message.Cli -r ${{ matrix.rid }} -c Release -o ./publish /p:DebugType=None /p:DebugSymbols=false
- name: Archive release for ${{ matrix.rid }}
uses: thedoctor0/[email protected]
with:
type: "zip"
directory: "./publish/"
filename: "${{ matrix.rid }}.zip"
path: "."
- name: Push ${{ matrix.rid }}.zip to release
uses: ncipollo/release-action@v1
with:
artifacts: "./publish/${{ matrix.rid }}.zip"
allowUpdates: true
draft: true
nuget:
runs-on: ubuntu-latest
name: Nuget Push
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v3
with:
dotnet-version: "9.x"
- name: build app
run: dotnet build src/Lazvard.Message.Amqp.Server -c Release -o ./publish/
- name: Nuget Push
run: dotnet nuget push ./publish/*.nupkg -k ${{ secrets.NUGET_TOKEN }} -s https://api.nuget.org/v3/index.json --skip-duplicate
docker:
runs-on: ubuntu-latest
name: Push Docker image to Docker Hub
steps:
- uses: actions/checkout@v2
- name: Log in to Docker Hub
uses: docker/login-action@3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: pejmann/lazvard-message
- name: Build and push Docker image
id: push
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
file: ./Containerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: pejmann/lazvard-message
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true