@@ -102,47 +102,29 @@ jobs:
102102 registry-url : https://registry.npmjs.org
103103 - run : npm install
104104 - run :
105- npm ${{ inputs.release && 'publish' || 'publish --dry-run' }}
105+ npm ${{ inputs.release && 'publish' || 'publish --dry-run' }} || ${{
106+ inputs.release && 'true' || 'false' }}
106107 env :
107108 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
108- - name : install ldid
109- run : |
109+ - run : |
110110 sudo apt install --yes libplist-dev
111111 git clone --branch v2.1.5 git://git.saurik.com/ldid.git
112112 sudo g++ -pipe -o /usr/bin/ldid ldid/ldid.cpp -I. -x c ldid/{lookup2.c,sha1.h} -lplist -lcrypto
113- - id : build
114- name : build
115- run : |
116- echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
113+ - run : |
117114 cp node_modules/@npcz/magic/dist/magic.mgc assets/magic.mgc
118115 npx --yes pkg --no-bytecode --public-packages "*" --public package.json
119- rm assets/magic.mgc
120- for cmd in '' runner publish pr; do
121- build/cml-linux-x64 $cmd --version
122- done
116+ for cmd in '' runner publish pr; do build/cml-linux-x64 $cmd --version; done
123117 cp build/cml-linux{-x64,}
124118 cp build/cml-macos{-x64,}
125- - uses : softprops/action-gh-release@v1
126- if : inputs.release
127- with :
128- files : |
129- build/cml-alpine-arm64
130- build/cml-alpine-x64
131- build/cml-linux-arm64
132- build/cml-linuxstatic-arm64
133- build/cml-linuxstatic-x64
134- build/cml-linux-x64
135- build/cml-linux
136- build/cml-macos-arm64
137- build/cml-macos-x64
138- build/cml-macos
139- build/cml-win-arm64.exe
140- build/cml-win-x64.exe
119+ - if : inputs.release
120+ run :
121+ find build -type f | xargs gh release upload $(basename ${{
122+ github.head_ref }})
141123 env :
142124 GITHUB_TOKEN : ${{ secrets.TEST_GITHUB_TOKEN }}
143125 images :
144126 needs : packages
145127 secrets : inherit
146128 uses : ./.github/workflows/images.yml
147129 with :
148- release : ${{ inputs.release }}
130+ release : ${{ inputs.release || false }}
0 commit comments