From 4f1d9991a2bd7c27b9e3e8ea70496ffa46f69b1f Mon Sep 17 00:00:00 2001 From: Sergey Date: Sat, 20 Jul 2024 14:19:05 -0400 Subject: [PATCH] Update build-test.yml --- .github/workflows/build-test.yml | 65 +++++++++++++++++++++++--------- 1 file changed, 48 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 5a9665c1..f5ab64b4 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -1,34 +1,65 @@ -name: Build Test +name: Version Bump on: push: - tags: - - 'v*' branches: [ "main" ] pull_request: branches: [ "main" ] jobs: - test-tauri: - runs-on: macos-latest + version-bump: + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Setup node uses: actions/setup-node@v4 with: node-version: lts/* - - name: Install Rust stable - uses: dtolnay/rust-toolchain@stable - with: - targets: aarch64-apple-darwin + - name: Install dependencies + run: npm ci - - name: Install packages - run: npm install + - name: Check for changesets + id: check_changes + run: | + if [ -n "$(ls .changeset/*.md 2>/dev/null)" ]; then + echo "changes_detected=true" >> $GITHUB_OUTPUT + else + echo "changes_detected=false" >> $GITHUB_OUTPUT + fi - - name: Build Tauri App - uses: tauri-apps/tauri-action@v0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - args: "--target aarch64-apple-darwin" + - name: Version bump and update changelog + if: steps.check_changes.outputs.changes_detected == 'true' + run: | + git config user.name github-actions + git config user.email github-actions@github.com + npm run version + git push --follow-tags + + # test-tauri: + # needs: version-bump + # runs-on: macos-latest + # steps: + # - uses: actions/checkout@v4 + # + # - name: Setup node + # uses: actions/setup-node@v4 + # with: + # node-version: lts/* + # + # - name: Install Rust stable + # uses: dtolnay/rust-toolchain@stable + # with: + # targets: aarch64-apple-darwin + # + # - name: Install packages + # run: npm install + # + # - name: Build Tauri App + # uses: tauri-apps/tauri-action@v0 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # args: "--target aarch64-apple-darwin"