Skip to content

Commit 897634a

Browse files
authored
Merge pull request #160 from linearis-oss/fix/release-automation-postmerge-errors
2 parents 76e0ba1 + 5b42037 commit 897634a

3 files changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/release-check.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,16 @@ jobs:
7272
with:
7373
fetch-depth: 0
7474
ref: ${{ steps.target.outputs.branch }}
75+
ssh-key: ${{ secrets.RELEASE_DEPLOY_KEY }}
76+
persist-credentials: false
77+
78+
- name: Configure git remote for SSH pushes
79+
shell: bash
80+
run: |
81+
set -euo pipefail
82+
git remote set-url origin git@github.com:${GITHUB_REPOSITORY}.git
83+
git config user.name "github-actions[bot]"
84+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
7585
7686
- name: Setup Node.js
7787
uses: actions/setup-node@v6
@@ -101,4 +111,5 @@ jobs:
101111
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
102112
GITHUB_REF: refs/heads/${{ steps.target.outputs.branch }}
103113
GITHUB_REF_NAME: ${{ steps.target.outputs.branch }}
114+
SEMANTIC_RELEASE_REPOSITORY_URL: git@github.com:${{ github.repository }}.git
104115
run: npm run release:run

.github/workflows/sync-main-release-back-to-next.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,12 @@ jobs:
2222
with:
2323
ref: next
2424
fetch-depth: 0
25+
ssh-key: ${{ secrets.RELEASE_DEPLOY_KEY }}
26+
persist-credentials: false
2527

2628
- name: Configure git
2729
run: |
30+
git remote set-url origin git@github.com:${GITHUB_REPOSITORY}.git
2831
git config user.name "github-actions[bot]"
2932
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
3033

.releaserc.cjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
module.exports = {
2+
repositoryUrl:
3+
process.env.SEMANTIC_RELEASE_REPOSITORY_URL ??
4+
"git@github.com:linearis-oss/linearis.git",
25
branches: ["main", { name: "next", prerelease: "next" }],
36
tagFormat: `v\${version}`,
47
plugins: [

0 commit comments

Comments
 (0)