This repository has been archived by the owner on Jan 2, 2025. It is now read-only.
fix(mentions): fix minor styles on mentions #193
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: Desktop app release | |
permissions: | |
contents: write | |
on: | |
push: | |
branches: | |
- "release/*" | |
tags: | |
- "*.*.*" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
AWS_REGION: us-east-1 | |
jobs: | |
get-version: | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.vars.outputs.version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get Latest Release | |
id: get_latest_release | |
uses: cardinalby/git-get-release-action@v1 | |
with: | |
latest: true | |
prerelease: true | |
# excludes: rc, alpha, beta # Optional. Exclude keywords like rc, alpha, beta releases. | |
- name: Bump possible release candidate version | |
id: bump_version | |
uses: christian-draeger/[email protected] | |
with: | |
current-version: ${{ steps.get_latest_release.outputs.name }} | |
version-fragment: "rc" | |
- name: Check out the branch or tag | |
id: vars | |
run: | | |
# echo "version=${{ github.ref_name }}" >> "$GITHUB_OUTPUT" | |
if [[ $GITHUB_REF =~ ^refs/tags/ ]]; then | |
VERSION=${{ github.ref_name }} | |
elif [[ $GITHUB_REF =~ ^refs/heads/release/.* ]]; then | |
VERSION=${{ steps.bump_version.outputs.next-version }} | |
else | |
VERSION=0.0.1 | |
fi | |
echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
build-binaries: | |
name: Build ${{ matrix.config.os }} @ ${{ matrix.config.arch }} | |
runs-on: ${{ matrix.config.os }} | |
# if: startsWith(github.ref, 'refs/tags/') | |
needs: [get-version] | |
strategy: | |
matrix: | |
config: | |
- os: macos-latest-xl | |
arch: x64 | |
goarch: amd64 | |
daemon_name: x86_64-apple-darwin | |
- os: macos-latest-xl | |
arch: arm64 | |
goarch: arm64 | |
daemon_name: aarch64-apple-darwin | |
- os: ubuntu-20.04 | |
arch: x64 | |
goarch: amd64 | |
daemon_name: x86_64-unknown-linux-gnu | |
- os: windows-latest | |
arch: x64 | |
goarch: amd64 | |
daemon_name: x86_64-pc-windows-msvc | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- uses: ./.github/actions/ci-setup | |
with: | |
matrix-os: ${{ matrix.config.os }} | |
# matrix-target: ${{ matrix.config.daemon_name }} | |
# matrix-arch: ${{ matrix.config.arch }} | |
- name: Build Backend (Unix) | |
if: matrix.config.os != 'windows-latest-l' | |
run: | | |
mkdir -p plz-out/bin/backend | |
go build -o plz-out/bin/backend/mintterd-${{ matrix.config.daemon_name }} ./backend/cmd/mintterd | |
env: | |
GOARCH: ${{ matrix.config.goarch }} | |
CGO_ENABLED: 1 | |
- name: Build Backend (Windows) | |
if: matrix.config.os == 'windows-latest-l' | |
run: | | |
mkdir -p plz-out/bin/backend | |
go build -o plz-out/bin/backend/mintterd-${{ matrix.config.daemon_name }}.exe ./backend/cmd/mintterd | |
env: | |
GOOS: "windows" | |
GOARCH: ${{ matrix.config.goarch }} | |
CGO_ENABLED: 1 | |
- name: Set MacOS signing certs | |
if: matrix.config.os == 'macos-latest-xl' | |
env: | |
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE_BASE64 }} | |
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
APPLE_KEYCHAIN_PASSWORD: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }} | |
run: | | |
echo $APPLE_CERTIFICATE | base64 --decode > certificate.p12 | |
security create-keychain -p $APPLE_KEYCHAIN_PASSWORD build.keychain | |
security default-keychain -s build.keychain | |
security unlock-keychain -p $APPLE_KEYCHAIN_PASSWORD build.keychain | |
security import certificate.p12 -k build.keychain -P $APPLE_CERTIFICATE_PASSWORD -T /usr/bin/codesign | |
security set-key-partition-list -S apple-tool:,apple: -s -k $APPLE_KEYCHAIN_PASSWORD build.keychain | |
rm -fr *.p12 | |
security set-keychain-settings -lut 1200 # prevent the keychain to get locked before codesign is done | |
- name: Set temporal version in package.json | |
run: | | |
node scripts/set-desktop-version.mjs | |
env: | |
VITE_VERSION: "${{ needs.get-version.outputs.version }}" | |
- name: Build, package & make (Unix) | |
if: matrix.config.os != 'windows-latest-l' | |
run: | | |
yarn desktop:make --arch=${{ matrix.config.arch }} | |
env: | |
NODE_OPTIONS: --max_old_space_size=4096 | |
APPLE_ID: ${{ secrets.APPLE_ID }} | |
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} | |
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
DAEMON_NAME: ${{ matrix.config.daemon_name }} | |
VITE_VERSION: "${{ needs.get-version.outputs.version }}" | |
# VITE_VERSION: "0.0.100" | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
timeout-minutes: 10 | |
VITE_DESKTOP_P2P_PORT: "55000" | |
VITE_DESKTOP_HTTP_PORT: "55001" | |
VITE_DESKTOP_GRPC_PORT: "55002" | |
VITE_DESKTOP_APPDATA: "Mintter" | |
VITE_DESKTOP_HOSTNAME: "http://localhost" | |
VITE_DESKTOP_SENTRY_DSN: "${{ secrets.DESKTOP_SENTRY_DSN }}" | |
SENTRY_AUTH_TOKEN: "${{ secrets.SENTRY_AUTH_TOKEN }}" | |
- name: Build, package and make (Win32) | |
if: matrix.config.os == 'windows-latest-l' | |
run: | | |
yarn desktop:make --arch=${{ matrix.config.arch }} | |
env: | |
DAEMON_NAME: "${{ matrix.config.daemon_name }}.exe" | |
VITE_VERSION: "${{ needs.get-version.outputs.version }}" | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
VITE_DESKTOP_SENTRY_DSN: "${{ secrets.DESKTOP_SENTRY_DSN }}" | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
timeout-minutes: 10 | |
VITE_DESKTOP_P2P_PORT: "55000" | |
VITE_DESKTOP_HTTP_PORT: "55001" | |
VITE_DESKTOP_GRPC_PORT: "55002" | |
VITE_DESKTOP_APPDATA: "Mintter" | |
VITE_DESKTOP_HOSTNAME: "http://localhost" | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: artifacts-${{ matrix.config.daemon_name }} | |
path: frontend/apps/desktop/out/make/**/* | |
publish-to-github: | |
needs: [get-version, build-binaries] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Download amd64 artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
path: artifacts | |
- name: "create release" | |
uses: softprops/action-gh-release@master | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
with: | |
tag_name: "${{ needs.get-version.outputs.version }}" | |
prerelease: true | |
generate_release_notes: true | |
files: ./artifacts/artifacts-*/**/* |