Adjust publish steps #3
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
name: Build-Releases | |
on: | |
push: | |
tags: | |
- v1.* # Push events to v1.0, v1.1, and v1.9 tags | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.x | |
- name: Get current tag | |
run: echo "CURRENT_TAG=`git describe --tags --abbrev=0`" >> $GITHUB_ENV | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build a Win-x64 release | |
run: dotnet publish -c Release -f net8.0 -r win-x64 -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishTrimmed=true --self-contained true -o publish | |
- name: Rename and move Win-x64 binary | |
run: mv publish/Dithery-cli.exe dithery.exe | |
- name: Build a Linux-x64 release | |
run: dotnet publish -c Release -f net8.0 -r linux-x64 -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishTrimmed=true --self-contained true -o publish | |
- name: Rename and move Linux-x64 binary | |
run: mv publish/Dithery-cli dithery | |
- name: Install zip | |
run: sudo apt install zip | |
- name: Package Win-x64 release | |
run: zip -9 release_${{ env.CURRENT_TAG }}-win_x64.zip dithery.exe | |
- name: Package Linux-x64 release | |
run: zip -9 release_${{ env.CURRENT_TAG }}-linux_x64.zip dithery | |
- uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
files: | | |
release_${{ env.CURRENT_TAG }}-win_x64.zip | |
release_${{ env.CURRENT_TAG }}-linux_x64.zip | |