File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 required : true
1818 description : Increment version
1919 options :
20+ - ignore
2021 - patch
2122 - minor
2223 - major
3233
3334jobs :
3435 release :
35- name : Increment version
36+ name : Release
3637 runs-on : ubuntu-latest
3738 steps :
3839 - uses : actions/checkout@v6
4849 - run : bun run build
4950 - run : bun run test
5051 - name : Increment versions and push changes
52+ if : ${{ github.event.inputs.increment != 'ignore' }}
5153 run : |
5254 cd ./packages/${{ github.event.inputs.package }}
5355 bun pm version "${{ github.event.inputs.increment }}" --no-git-tag-version
6264 run : |
6365 npm config set provenance true
6466 echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
65- ./scripts/publish.sh ./packages/sysopkit --provenance
66- ./scripts/publish.sh ./packages/@sysopkit/linux --provenance
67- ./scripts/publish.sh ./packages/@sysopkit/openwrt --provenance
68- ./scripts/publish.sh ./packages/@sysopkit/cli --provenance
67+ ./scripts/publish.sh ./packages/${{ github.event.inputs.package }} --provenance
Original file line number Diff line number Diff line change 22
33set -euo pipefail
44
5- cd packages/sysopkit/
5+ cd " $1 "
6+ shift
67
7- current_version =$( jq -r .version package.json)
8- package_name =$( jq -r .name package.json)
9- published_version =$( npm --no-workspaces view " $package_name " version 2> /dev/null || echo " " )
8+ CURRENT_VER =$( jq -r .version package.json)
9+ PKG_NAME =$( jq -r .name package.json)
10+ PUBLISHED_VER =$( npm --no-workspaces view " $PKG_NAME " version 2> /dev/null || echo " " )
1011
11- if [[ " $published_version " == " $current_version " ]]; then
12- echo " Version $current_version already published"
12+ if [[ " $PUBLISHED_VER " == " $CURRENT_VER " ]]; then
1313 exit 0
1414fi
1515
16- filename =" ${PWD} /archive.tgz"
17- bun pm pack --filename " $filename "
18- npm --no-workspaces publish " $filename " --access public " $@ "
19- rm -rf " $filename "
16+ ARCHIVE =" ${PWD} /archive.tgz"
17+ bun pm pack --filename " $ARCHIVE "
18+ npm --no-workspaces publish " $ARCHIVE " --access public " $@ "
19+ rm -rf " $ARCHIVE "
You can’t perform that action at this time.
0 commit comments