Build and Release #77
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 and Release | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- 'release/*' | |
paths: | |
- 'SpinShareClient/**' | |
jobs: | |
build: | |
name: build-and-publish | |
permissions: write-all | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 21.x | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore NuGet packages | |
run: dotnet restore | |
- name: Run tests | |
run: dotnet test --no-restore --verbosity normal | |
- name: Install flatpak dependencies | |
run: | | |
sudo apt update | |
sudo apt install flatpak flatpak-builder | |
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo | |
sudo flatpak install org.gnome.Sdk/x86_64/45 -y | |
sudo flatpak install org.gnome.Platform/x86_64/45 -y | |
shell: bash | |
- name: List Files | |
run: | | |
ls -lp ./publish | |
shell: bash | |
- name: Build & Publish | |
run: | | |
cd ./publish | |
git update-index --chmod=+x publish.sh | |
./publish.sh "win-x64 linux-x64" "3.0.0-preview" | |
shell: bash | |
- name: List Files | |
run: | | |
ls -lp ./publish/output | |
shell: bash | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
publish/output/spinshare.3.0.0-preview.win-x64.zip | |
publish/output/spinshare.3.0.0-preview.linux-x64.flatpak | |
token: ${{ secrets.GITHUB_TOKEN }} | |
generate_release_notes: true | |
name: 3.0.0 Preview ${{ github.event.repository.updated_at }} | |
draft: true | |
prerelease: true | |