@@ -3,6 +3,7 @@ name: Release varlock CLI binaries
33# normal CI release workflow handles publishing multiple packages from the monorepo
44# this workflow triggered by a release `[email protected] `55on :
6+ workflow_dispatch :
67 release :
78 types : [published]
89 tags :
@@ -32,39 +33,72 @@ jobs:
3233 # ------------------------------------------------------------
3334
3435 - name : get version from release tag
36+ if : ${{ github.event_name == 'release' }}
3537 run : |
3638 # get the full release tag name - ex: [email protected] 3739 echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
3840 # get the version only from the tag - ex: 1.2.3
3941 echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/varlock@}" >> $GITHUB_ENV
42+
43+ - name : use test version (x.x.x)
44+ if : ${{ github.event_name == 'workflow_dispatch' }}
45+ run : |
46+ echo "[email protected] " >> $GITHUB_ENV 47+ echo "RELEASE_VERSION=x.x.x" >> $GITHUB_ENV
4048
41- # necessary to bundle macos binaries from linux machine
49+ # necessary to bundle macos binaries ( from linux)
4250 - name : install ldid
4351 uses : MOZGIII/install-ldid-action@v1
4452 with :
45- tag : v2.1.5-procursus2
53+ tag : v2.1.5-procursus7
54+ # necessary for cross-arch linux binaries
55+ - name : Install qemu-user-binfmt
56+ run : |
57+ # sudo apt-get update
58+ sudo apt-get install --assume-yes qemu-user-binfmt
4659
60+ - name : build libs
61+ run : pnpm build:libs
4762 - name : build SEA dist files (CJS, no deps)
4863 run : pnpm run --filter varlock build:sea
4964
50- - name : pkg binaries
51- run : node scripts/build-binaries.js
52-
65+ - name : Restore pkg Node.js base binaries
66+ uses : actions/cache/restore@v4
67+ with :
68+ path : ~/.pkg-cache
69+ key : pkg-nodejs-base-binaries-node-22
70+ - name : build varlock SEA binaries (pkg)
71+ # env:
72+ # PKG_CACHE_PATH: ~/.pkg-cache
73+ run : PKG_CACHE_PATH=~/.pkg-cache node scripts/build-binaries.js
74+ - name : Cache pkg Node.js base binaries
75+ uses : actions/cache/save@v4
76+ with :
77+ path : ~/.pkg-cache
78+ key : pkg-nodejs-base-binaries-node-22
5379 - name : add binaries to GH release
54- run : gh release upload ${{ env.RELEASE_TAG }} packages/varlock/dist-sea/*.{tar.gz,zip}
55-
56- - name : Add release checksums
57- uses : wangzuo/action- release- checksums@v1
80+ env :
81+ GH_TOKEN : ${{ github.token }}
82+ working-directory : packages/varlock/dist-sea
83+ run : gh release upload ${{ env.RELEASE_TAG }} *.{tar.gz,zip} checksums.txt --clobber
5884
5985 # UPDATE HOMEBREW FORMULA ---
6086 - name : checkout homebrew tap repo
6187 uses : actions/checkout@v4
6288 with :
63- repository : " dmno-dev/homebrew-tap"
64- token : ${{ secrets.PERSONAL_ACCESS_TOKEN }}
65- - name : ' update formula'
66- run : node scripts/update-homebrew-formula.js ${{ env.RELEASE_VERSION }}
67- - name : commit and push homebrew tap
89+ repository : dmno-dev/homebrew-tap
90+ token : ${{ secrets.HOMEBREW_REPO_GITHUB_ACCESS_TOKEN }}
91+ path : homebrew-tap
92+ clean : false
93+ - name : debug
94+ run : |
95+ ls -la
96+ ls -la homebrew-tap
97+ ls -la ../
98+ ls -la ../..
99+ - name : update homebrew formula
100+ run : node scripts/update-homebrew-formula.js
101+ - name : commit and push homebrew tap update
68102 run : |
69103 cd homebrew-tap
70104 git config --global user.name 'theoephraim'
0 commit comments