Skip to content

Merge pull request #69 from guitarrapc/feature/ci #7

Merge pull request #69 from guitarrapc/feature/ci

Merge pull request #69 from guitarrapc/feature/ci #7

Workflow file for this run

name: release
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+*" # only tag
env:
BUILD_CONFIG: Release
jobs:
build-dotnet:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- uses: guitarrapc/actions/.github/actions/setup-dotnet@main
with:
restore-wasm-workload: true
dotnet-version: |
6.0.x
7.0.x
8.0.x
# tag
- run: echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
# build
- run: dotnet build -c ${{ env.BUILD_CONFIG }} SkiaSharp.QrCode.Linux.slnf -p:Version=${{ env.GIT_TAG }}
# pack
- run: dotnet pack ./src/SkiaSharp.QrCode/ -c ${{ env.BUILD_CONFIG }} SkiaSharp.QrCode.Linux.slnf -p:Version=${{ env.GIT_TAG }} -o ./pack
- uses: actions/upload-artifact@v2
with:
name: nuget
path: ./pack/
create-release:
needs: [build-dotnet]
runs-on: ubuntu-latest
steps:
- uses: guitarrapc/actions/.github/actions/setup-dotnet@main
- run: echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
# Create Release
- uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true
prerelease: false
- uses: actions/download-artifact@v2
# upload nuget
- run: dotnet nuget push "./nuget/*.nupkg" --skip-duplicate -s https://www.nuget.org/api/v2/package -k ${{ secrets.SYNCED_NUGET_KEY }}