Skip to content

Add a link to profile editor for founders (#232) #278

Add a link to profile editor for founders (#232)

Add a link to profile editor for founders (#232) #278

Workflow file for this run

name: Build and Publish
on:
push:
branches: [ main ]
permissions:
contents: write
jobs:
build:
name: Build (${{ matrix.name }})
strategy:
matrix:
include:
- name: Windows x64
os: windows-latest
extension: ".zip"
runtime: "win-x64"
# - name: Windows ARM64
# os: windows-latest
# extension: ".zip"
# runtime: "win-arm64"
- name: Linux x64
os: ubuntu-latest
extension: ".tar.gz"
runtime: "linux-x64"
# - name: macOS x64
# os: macos-13
# runtime: "osx-x64"
# extension: ".zip"
- name: macOS ARM64
os: macos-latest
runtime: "osx-arm64"
extension: ".zip"
fail-fast: false
runs-on: ${{ matrix.os }}
env:
PROJECT_NAME: "Angor"
SOLUTION_PATH: "src/Angor.sln"
PROJECT_PATH: "src/Angor/Client/Angor.Client.csproj"
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Variables
run: |
echo VERSION=$(npm run version --silent) >> $GITHUB_ENV
shell: bash
- name: Publish
run: dotnet publish -c Release -r ${{matrix.runtime}} /p:Version=${{ env.VERSION }}.${{ github.run_number }} -v m -o publish ${{env.PROJECT_PATH}}
- name: Run Tests
continue-on-error: true
run: dotnet test -c Release -r ${{matrix.runtime}} --verbosity normal ${{env.SOLUTION_PATH}}
- name: Zip Release
run: |
cd publish
if [ "${{ matrix.os }}" = "windows-latest" ]; then
7z a -tzip "../angor-web-${{ env.VERSION }}-${{ matrix.runtime }}.zip" .
elif [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
zip -r "../angor-web-${{ env.VERSION }}-${{ matrix.runtime }}.zip" .
else
zip -r "../angor-web-${{ env.VERSION }}-${{ matrix.runtime }}.zip" .
fi
shell: bash
- name: Upload Build Artifact
uses: actions/upload-artifact@v4
with:
name: angor-web-${{ env.VERSION }}-${{ matrix.runtime }}.zip
path: angor-web-${{ env.VERSION }}-${{ matrix.runtime }}.zip
- name: Install Rust (Stable)
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install Linux dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev webkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libsoup-3.0-dev libjavascriptcoregtk-4.1-dev
- name: Install and build
run: |
npm install
npm run tauri:build:${{ matrix.runtime }}
- name: Rename Linux files
if: matrix.os == 'ubuntu-latest'
run: |
mv src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/Angor_${{ env.VERSION }}_amd64.AppImage src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/angor-desktop-${{ env.VERSION }}-linux-amd64.AppImage
- name: Rename Mac files
if: matrix.runtime == 'osx-x64'
run: |
mv src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/Angor_${{ env.VERSION }}_aarch64.dmg src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/angor-desktop-${{ env.VERSION }}-mac-aarch64.dmg
- name: Rename Mac files
if: matrix.runtime == 'osx-arm64'
run: |
mv src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/Angor_${{ env.VERSION }}_aarch64.dmg src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/angor-desktop-${{ env.VERSION }}-mac-aarch64.dmg
- name: Rename Windows files
if: matrix.runtime == 'win-x64'
run: |
mv src-tauri/target/x86_64-pc-windows-msvc/release/bundle/msi/Angor_${{ env.VERSION }}_x64_en-US.msi src-tauri/target/x86_64-pc-windows-msvc/release/bundle/msi/angor-desktop-${{ env.VERSION }}-win-x64.msi
- name: Rename Windows files
if: matrix.runtime == 'win-arm64'
run: |
mv src-tauri/target/release/bundle/msi/Angor_${{ env.VERSION }}_arm64_en-US.msi src-tauri/target/release/bundle/msi/angor-desktop-${{ env.VERSION }}-win-arm64.msi
- uses: actions/upload-artifact@v4
name: Upload Linux
if: matrix.os == 'ubuntu-latest'
with:
name: angor-desktop-${{ env.VERSION }}-linux-amd64.AppImage
path: src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/angor-desktop-${{ env.VERSION }}-linux-amd64.AppImage
- uses: actions/upload-artifact@v4
name: Upload Mac
if: matrix.os == 'macos-latest'
with:
name: angor-desktop-${{ env.VERSION }}-mac-aarch64.dmg
path: src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/angor-desktop-${{ env.VERSION }}-mac-aarch64.dmg
- uses: actions/upload-artifact@v4
name: Upload Windows
if: matrix.runtime == 'win-x64'
with:
name: angor-desktop-${{ env.VERSION }}-win-x64.msi
path: src-tauri/target/x86_64-pc-windows-msvc/release/bundle/msi/angor-desktop-${{ env.VERSION }}-win-x64.msi
- uses: actions/upload-artifact@v4
name: Upload Windows
if: matrix.runtime == 'win-arm64'
with:
name: angor-desktop-${{ env.VERSION }}-win-arm64.msi
path: src-tauri/target/x86_64-pc-windows-msvc/release/bundle/msi/angor-desktop-${{ env.VERSION }}-win-arm64.msi
create-release:
name: Publish (Release)
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Variables
run: |
echo VERSION=$(npm run version --silent) >> $GITHUB_ENV
shell: bash
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: List Files
run: ls -R
- name: Create Release and Upload Assets
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
name: Angor (${{ env.VERSION }})
draft: true
files: |
artifacts/*
deploy-release:
name: Deploy (Test)
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Variables
run: |
echo VERSION=$(npm run version --silent) >> $GITHUB_ENV
shell: bash
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: List Files
run: ls -R
- name: Unzip Artifact
run: |
unzip artifacts/angor-web-${{ env.VERSION }}-linux-x64.zip -d dist
shell: bash
- name: Copy index.html to 404.html
run: cp dist/wwwroot/index.html dist/wwwroot/404.html
- name: Add .nojekyll file
run: touch dist/wwwroot/.nojekyll
- name: Deploy to Github Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: main
folder: dist/wwwroot
repository-name: block-core/angor-test
token: ${{ secrets.ANGOR_DEPLOY_TOKEN }}