Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 0 additions & 107 deletions .github/workflows/create-github-pr.yml

This file was deleted.

11 changes: 9 additions & 2 deletions .github/workflows/create-github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@ jobs:
with:
node-version: 20

- name: Get github app access token
id: get_access_token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.XERO_PUBLIC_APP_ID }}
private-key: ${{ secrets.XERO_PUBLIC_BOT_KEY }}

- name: Perform release
run: npx semantic-release
run: npx --package @semantic-release/exec semantic-release
env:
GH_TOKEN: ${{ github.token }}
GH_TOKEN: ${{ steps.get_access_token.outputs.token }}
5 changes: 3 additions & 2 deletions .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@
}
],
[
"@semantic-release/github",
"@semantic-release/exec",
{
"draftRelease": true
"prepareCmd": "./update-version.sh ${nextRelease.version}"
}
],
"@semantic-release/github",
"@semantic-release/commit-analyzer"
]
}
15 changes: 15 additions & 0 deletions scripts/update-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

versionNumber=${1:?Version number is required as first argument}
branchName=${2:-master}

git checkout "$branchName"

for file in xero*.yaml; do
yq eval --no-colors --prettyPrint ".info.version = \"$versionNumber\"" -i "$file"
echo "updated version in $file to $versionNumber"
done

git add xero*.yaml
git commit -m "chore: bump version to $versionNumber"
git push origin "$branchName"
Loading