Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: optimize release job definitions (#1933)
Yilong Li37bdfc5121fd
diff --git a/.github/workflows/build-artifacts-and-draft-release.yml b/.github/workflows/build-artifacts-and-draft-release.ymlindex f1d2e94834..cfe8f04023 100644--- a/.github/workflows/build-artifacts-and-draft-release.yml+++ b/.github/workflows/build-artifacts-and-draft-release.yml@@ -6,8 +6,13 @@ on:- "*.*.*"jobs:- build-linux-binary:- runs-on: ubuntu-latest+ build-binary:+ strategy:+ matrix:+ os:+ - "ubuntu"+ - "macos"+ runs-on: ${{ matrix.os }}-lateststeps:- uses: actions/checkout@v3- uses: pnpm/[email protected]@@ -30,39 +35,7 @@ jobs:- name: Builduses: goreleaser/goreleaser-action@v2with:- args: release --skip-publish --config .goreleaser-for-linux.yaml- env:- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}- - name: Upload- uses: actions/upload-artifact@v3- with:- name: bytebase-linux- path: dist/bytebase*- build-darwin-binary:- runs-on: macos-latest- steps:- - uses: actions/checkout@v3- - uses: pnpm/[email protected]- with:- version: 6.10.0- - uses: actions/setup-node@v3- with:- node-version: "14"- cache: pnpm- cache-dependency-path: "frontend/pnpm-lock.yaml"- - run: pnpm install --frozen-lockfile- working-directory: frontend- - run: pnpm release- working-directory: frontend- - uses: actions/setup-go@v3- with:- go-version: 1.18- check-latest: true- cache: true- - name: Build- uses: goreleaser/goreleaser-action@v2- with:- args: release --skip-publish --config .goreleaser-for-darwin.yaml+ args: release --skip-publish --config .goreleaser-for-${{ matrix.os }}.yamlenv:GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}- name: Upload@@ -70,8 +43,10 @@ jobs:with:name: bytebase-darwinpath: dist/bytebase*+draft-release:- needs: [build-linux-binary, build-darwin-binary]+ needs:+ - build-binaryruns-on: ubuntu-lateststeps:- uses: actions/checkout@v3diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.ymlindex 198b7676ec..be633570fb 100644--- a/.github/workflows/tests.yml+++ b/.github/workflows/tests.yml@@ -31,36 +31,13 @@ jobs:args: -v# Copied from build-artifacts-and-draft-release.yml, should be consistent if updating build-artifacts-and-draft-release.yml.- release-dry-run-linux:- runs-on: ubuntu-latest- steps:- - uses: actions/checkout@v3- - uses: pnpm/[email protected]- with:- version: 6.10.0- - uses: actions/setup-node@v3- with:- node-version: "14"- cache: pnpm- cache-dependency-path: "frontend/pnpm-lock.yaml"- - run: pnpm install --frozen-lockfile- working-directory: frontend- - run: pnpm release- working-directory: frontend- - uses: actions/setup-go@v3- with:- go-version: 1.18- check-latest: true- cache: true- - name: Release dry-run- uses: goreleaser/goreleaser-action@v2- with:- args: release --skip-publish --config .goreleaser-for-linux.yaml- env:- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}-- release-dry-run-darwin:- runs-on: macos-latest+ release-dry-run:+ strategy:+ matrix:+ os:+ - "ubuntu"+ - "macos"+ runs-on: ${{ matrix.os }}-lateststeps:- uses: actions/checkout@v3- uses: pnpm/[email protected]@@ -80,10 +57,10 @@ jobs:go-version: 1.18check-latest: truecache: true- - name: Release dry-run+ - name: Builduses: goreleaser/goreleaser-action@v2with:- args: release --skip-publish --config .goreleaser-for-darwin.yaml+ args: release --skip-publish --config .goreleaser-for-${{ matrix.os }}.yamlenv:GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}diff --git a/.goreleaser-for-darwin.yaml b/.goreleaser-for-macos.yamlsimilarity index 100%rename from .goreleaser-for-darwin.yamlrename to .goreleaser-for-macos.yamldiff --git a/.goreleaser-for-linux.yaml b/.goreleaser-for-ubuntu.yamlsimilarity index 100%rename from .goreleaser-for-linux.yamlrename to .goreleaser-for-ubuntu.yaml