diff --git a/.github/workflows/gorelease.yaml b/.github/workflows/gorelease.yaml index 693b916d..39be80ac 100644 --- a/.github/workflows/gorelease.yaml +++ b/.github/workflows/gorelease.yaml @@ -36,4 +36,4 @@ jobs: version: latest args: release --rm-dist env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.SCHEMACHECK_RELEASE_TOKEN }} diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml deleted file mode 100644 index 425ade26..00000000 --- a/.github/workflows/main.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# This is the workflow for the main release branch. - -name: Main Build, Test, and Publish - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - - test-check-go: - uses: ./.github/workflows/test-check-go.yaml - - semrelease: - uses: ./.github/workflows/semrelease.yaml - needs: test-check-go - if: - contains(' - refs/heads/main - ', github.ref) diff --git a/.github/workflows/semrelease.yaml b/.github/workflows/semrelease.yaml index 5214d89a..cb1a9fb7 100644 --- a/.github/workflows/semrelease.yaml +++ b/.github/workflows/semrelease.yaml @@ -3,14 +3,19 @@ name: Semantic Release on: - workflow_call: + push: + branches: [ main ] jobs: + test-check-go: + uses: ./.github/workflows/test-check-go.yaml + semrelease: name: Sem Release runs-on: ubuntu-latest + needs: test-check-go steps: - name: Checkout source @@ -18,5 +23,5 @@ jobs: - uses: go-semantic-release/action@v1 with: - github-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ secrets.SCHEMACHECK_RELEASE_TOKEN }} changelog-generator-opt: "emojis=true" diff --git a/.github/workflows/test-check-go.yaml b/.github/workflows/test-check-go.yaml index 0315b323..5c92696e 100644 --- a/.github/workflows/test-check-go.yaml +++ b/.github/workflows/test-check-go.yaml @@ -3,6 +3,8 @@ name: Make Test and Checks on: + pull_request: + branches: [ main ] workflow_call: jobs: