Skip to content

Commit

Permalink
fix: manual tag on release-it
Browse files Browse the repository at this point in the history
  • Loading branch information
Vexcited committed Aug 30, 2023
1 parent 2414041 commit 74eb97e
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 27 deletions.
89 changes: 89 additions & 0 deletions .github/workflows/beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: "beta: build"

on:
push:
branches:
- main
tags-ignore:
- '**'

jobs:
build:
strategy:
fail-fast: false
matrix:
toolchain: [stable]

target:
- x86_64-unknown-linux-gnu
# - aarch64-unknown-linux-gnu
- x86_64-apple-darwin
- aarch64-apple-darwin
- x86_64-pc-windows-msvc
include:
- os: ubuntu-20.04
target: x86_64-unknown-linux-gnu
use-cross: false

# - os: ubuntu-20.04
# target: aarch64-unknown-linux-gnu
# use-cross: true

- os: macos-latest
target: x86_64-apple-darwin
use-cross: false

- os: macos-11
target: aarch64-apple-darwin
use-cross: false

- os: windows-latest
target: x86_64-pc-windows-msvc
use-cross: false

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3

- uses: pnpm/action-setup@v2
with:
version: 8

- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'

- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}

- name: Additional Ubuntu dependencies
if: matrix.os == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- uses: Swatinem/rust-cache@v2
with:
workspaces: "./src-tauri -> target"
key: v1-${{ matrix.target }}

- name: Install pnpm dependencies
run: pnpm install

- name: Build beta release
run: |
pnpm tauri build --target ${{ matrix.target }} -c ./src-tauri/tauri.beta.conf.json --ci
- name: Upload workflow artifacts
uses: actions/upload-artifact@v3
with:
if-no-files-found: ignore
name: ${{ matrix.target }}
path: |
src-tauri/target/${{ matrix.target }}/release/bundle/macos/SolidCord.app
src-tauri/target/${{ matrix.target }}/release/bundle/deb/solid-cord_*_amd64.deb
src-tauri/target/${{ matrix.target }}/release/SolidCord.exe
27 changes: 3 additions & 24 deletions .github/workflows/build.yml → .github/workflows/stable.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Build SolidCord
name: "stable: release"

on:
push:
branches:
- main
tags:
- "v*.*.*"

env:
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
Expand All @@ -21,7 +21,6 @@ jobs:
steps:
- id: release
uses: softprops/action-gh-release@v1
if: startsWith(github.event.ref, 'refs/tags/v')
with:
draft: true
prerelease: false
Expand Down Expand Up @@ -94,30 +93,11 @@ jobs:
- name: Install pnpm dependencies
run: pnpm install

# -> We're not building a stable release.
- name: Build beta release
if: startsWith(github.event.ref, 'refs/tags/v') == false
run: |
pnpm tauri build --target ${{ matrix.target }} -c ./src-tauri/tauri.beta.conf.json --ci
# -> We're building a stable release.
- name: Build stable release
if: startsWith(github.event.ref, 'refs/tags/v')
run: |
pnpm tauri build --target ${{ matrix.target }} -c ./src-tauri/tauri.conf.json --ci
- name: Upload workflow artifacts
uses: actions/upload-artifact@v3
with:
if-no-files-found: ignore
name: ${{ matrix.target }}
path: |
src-tauri/target/${{ matrix.target }}/release/bundle/macos/SolidCord.app
src-tauri/target/${{ matrix.target }}/release/bundle/deb/solid-cord_*_amd64.deb
src-tauri/target/${{ matrix.target }}/release/SolidCord.exe
- name: Upload assets to release
if: startsWith(github.event.ref, 'refs/tags/v')
uses: actions/github-script@v6
with:
script: |
Expand Down Expand Up @@ -176,7 +156,6 @@ jobs:
updater:
needs: [release, build]
if: startsWith(github.event.ref, 'refs/tags/v')
runs-on: ubuntu-latest

steps:
Expand Down
15 changes: 12 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@
"requireBranch": "main",
"tagName": "v${version}",
"tagAnnotation": "Release v${version}",
"commitMessage": "chore: release v${version}",
"requireCleanWorkingDir": false
"requireCleanWorkingDir": false,
"push": false,
"commit": false
},
"github": {
"release": false
Expand All @@ -61,7 +62,15 @@
"publish": false
},
"hooks": {
"after:bump": "node ./scripts/on-version-bump.js ${version}"
"after:bump": "node ./scripts/on-version-bump.js ${version}",
"before:release": [
"git add . --update",
"git commit --message \"chore: release v${version}\"",
"git push"
],
"after:release": [
"git push origin v${version}"
]
}
}
}

0 comments on commit 74eb97e

Please sign in to comment.