diff --git a/.github/workflows/publish-mrc-website.yml b/.github/workflows/publish-mrc-website.yml index 1f32758a9..599234a78 100644 --- a/.github/workflows/publish-mrc-website.yml +++ b/.github/workflows/publish-mrc-website.yml @@ -15,6 +15,10 @@ permissions: checks: write repository-projects: read +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: merge: name: generate storybook and coverage report diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index 24c9e0a8e..ff54b4ba5 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -15,7 +15,11 @@ permissions: statuses: write checks: write repository-projects: read - + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: chromatic-deployment: name: "Deploy Storybook to Chromatic" @@ -119,23 +123,38 @@ jobs: uses: "actions/checkout@v4" with: ref: ${{ github.ref }} - token: ${{ secrets.GITHUB_TOKEN }} + fetch-depth: 0 - - name: "cat package.json" - run: cat ./package.json + - name: Setup Git + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" - - name: "Automated Version Bump" - uses: "phips28/gh-action-bump-version@master" - with: - minor-wording: "solaceminor,SolaceMinor,SOLACEMINOR" - major-wording: "solacemajor,SolaceMajor,SOLACEMAJOR" - patch-wording: "solacepatch,SolacePatch,SOLACEPATCH" - tag-prefix: "" - commit-message: "CI: bumps version to {{version}} [skip ci]" # Add skip ci tag + - name: Install standard-version + run: npm install -g standard-version + + - name: Bump version + run: | + npx standard-version + + - name: Push changes env: - #Required for version bumping and by-passing branch protection - GITHUB_TOKEN: ${{ secrets.PACKAGES_ADMIN_TOKEN }} - - name: "cat package.json" - run: cat ./package.json + COMMIT_KEY: ${{ secrets.PACKAGES_ADMIN_TOKEN }} + SSH_AUTH_SOCK: /tmp/ssh_agent.sock + run: | + # Remove default token (read-only) + git config --unset http.https://github.com/.extraheader + # Setup ssh access + mkdir -p ~/.ssh + ssh-keyscan github.com >> ~/.ssh/known_hosts + ssh-agent -a $SSH_AUTH_SOCK > /dev/null + ssh-add - <<< "${COMMIT_KEY}" + git config --add url.git@github.com:.insteadof https://github.com/ + + # Pull latest changes before pushing + git pull --rebase origin main + + # Push with tags + git push --follow-tags origin + - diff --git a/.github/workflows/release-package.yaml b/.github/workflows/release-package.yaml index b6cd4ccbf..0d1996868 100644 --- a/.github/workflows/release-package.yaml +++ b/.github/workflows/release-package.yaml @@ -13,7 +13,11 @@ permissions: statuses: write checks: write repository-projects: read - + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build: runs-on: ubuntu-latest diff --git a/.versionrc b/.versionrc new file mode 100644 index 000000000..d7c8b0d3f --- /dev/null +++ b/.versionrc @@ -0,0 +1,56 @@ +{ + "types": [ + { + "type": "solacemajor", + "section": "Major Changes", + "hidden": false + }, + { + "type": "SolaceMajor", + "section": "Major Changes", + "hidden": false + }, + { + "type": "SOLACEMAJOR", + "section": "Major Changes", + "hidden": false + }, + { + "type": "solaceminor", + "section": "Minor Changes", + "hidden": false + }, + { + "type": "SolaceMinor", + "section": "Minor Changes", + "hidden": false + }, + { + "type": "SOLACEMINOR", + "section": "Minor Changes", + "hidden": false + }, + { + "type": "solacepatch", + "section": "Patch Changes", + "hidden": false + }, + { + "type": "SolacePatch", + "section": "Patch Changes", + "hidden": false + }, + { + "type": "SOLACEPATCH", + "section": "Patch Changes", + "hidden": false + } + ], + "commitAll": true, + "skip": { + "tag": true + }, + "scripts": { + "postbump": "git add . && git commit -m 'chore(release): %s [skip ci]'" + } +}