Improved Settings and Core selector menus #69
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: Publish | |
on: | |
release: | |
types: [published] | |
jobs: | |
release: | |
name: Release | |
strategy: | |
matrix: | |
kind: ['macOS', 'windows', 'linux'] | |
include: | |
- kind: macOS | |
os: macos-latest | |
target: osx | |
arm: true | |
- kind: windows | |
os: windows-latest | |
target: win | |
arm: false | |
- kind: linux | |
os: ubuntu-latest | |
target: linux | |
arm: true | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 6.0.400 | |
- name: Build | |
shell: bash | |
run: | | |
tag=$(git describe --tags --abbrev=0) | |
release_name="App-$tag-${{ matrix.target }}" | |
# Build everything | |
dotnet publish pocket_updater.csproj -r ${{ matrix.target }}-x64 --self-contained true -c Release -o "$release_name" --consoleloggerparameters:ErrorsOnly | |
if ${{ matrix.arm }}; then | |
mv ${release_name}/pocket_updater ${release_name}/pocket_updater_x64 | |
dotnet publish pocket_updater.csproj -r ${{ matrix.target }}-arm64 --self-contained true -c Release -o "$release_name" --consoleloggerparameters:ErrorsOnly | |
mv ${release_name}/pocket_updater ${release_name}/pocket_updater_arm64 | |
if [ "${{ matrix.target }}" == "linux" ]; then | |
dotnet publish pocket_updater.csproj -r ${{ matrix.target }}-arm --self-contained true -c Release -o "$release_name" --consoleloggerparameters:ErrorsOnly | |
mv ${release_name}/pocket_updater ${release_name}/pocket_updater_arm32 | |
fi | |
fi | |
# Pack files | |
if [ "${{ matrix.target }}" == "win" ]; then | |
# Pack to zip for Windows | |
7z a -tzip "pocket_updater_win.zip" "./${release_name}/pocket_updater.exe" | |
elif [ "${{ matrix.target }}" == "osx" ]; then | |
cd $release_name | |
lipo -create -output pocket_updater pocket_updater_arm64 pocket_updater_x64 | |
rm pocket_updater_arm64 | |
rm pocket_updater_x64 | |
zip "../pocket_updater_mac.zip" "pocket_updater"; cd ..; | |
else | |
cd $release_name | |
zip "../pocket_updater_linux.zip" "pocket_updater_x64" | |
zip "../pocket_updater_linux_arm64.zip" "pocket_updater_arm64" | |
zip "../pocket_updater_linux_arm32.zip" "pocket_updater_arm32" | |
cd .. | |
fi | |
# Delete output directory | |
rm -r "$release_name" | |
- name: Publish | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: "pocket_updater*.zip" | |
env: | |
GITHUB_TOKEN: ${{ secrets.API_TOKEN }} |