π merge from main #17
Workflow file for this run
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
on: | |
push: | |
tags: | |
- "[0-9]+.[0-9]+.[0-9]+" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- name: Setup .NET | |
uses: xt0rted/setup-dotnet@v1 | |
with: | |
dotnet-version: 6.0.x | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set VERSION variable from tag | |
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV | |
- name: Update private NuGet source | |
run: | | |
dotnet nuget add source --name NoP77svk --username anyone --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text "https://nuget.pkg.github.com/nop77svk/index.json" \ | |
|| dotnet nuget update source NoP77svk --username anyone --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --source "https://nuget.pkg.github.com/nop77svk/index.json" | |
- name: Build | |
run: dotnet build -c Release /p:Version=${VERSION} | |
- name: Test | |
run: dotnet test -c Release /p:Version=${VERSION} --no-build | |
# - name: Pack | |
# run: | | |
# dotnet pack -c Release /p:Version=${VERSION} --no-build --output . | |
# - name: Push | |
# run: dotnet nuget push NoP77svk.*.${VERSION}.nupkg --source https://nuget.pkg.github.com/nop77svk/index.json --api-key ${GITHUB_TOKEN} | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Prepare releases | |
run: | | |
mkdir _publish.all | |
- name: Windows x64 Build | |
run: | | |
dotnet publish ./jwl.console -c Release -o ./_publish.win-x64 -r win-x64 --self-contained | |
cd ./_publish.win-x64 | |
cp ../LICENSE . | |
zip -r9v ../_publish.all/jira-worklogger.${VERSION}.win.x64.zip . | |
cd .. | |
# - name: Linux x64 Build | |
# run: | | |
# dotnet publish -c Release -o ./_publish.linux-x64 -r linux-x64 --self-contained | |
# cd ./_publish.linux-x64 | |
# cp ../LICENSE . | |
# tar cv . | gzip -9c > ../_publish.all/jira-worklogger.${VERSION}.linux.x64.tgz | |
# cd .. | |
- name: Portable Build | |
run: | | |
dotnet publish ./jwl.console -c Release -o ./_publish.portable --no-self-contained -p:PublishTrimmed=false | |
cd ./_publish.portable | |
cp ../LICENSE . | |
zip -r9v ../_publish.all/jira-worklogger.${VERSION}.portable.zip . | |
cd .. | |
- name: Release All Builds | |
uses: softprops/action-gh-release@v1 | |
with: | |
token: "${{ secrets.GITHUB_TOKEN }}" | |
body: "<changelog should come here>" | |
prerelease: false | |
files: | | |
./_publish.all/jira-worklogger.* |