-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add CI for publishing articats package
- Loading branch information
Showing
3 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,11 +92,42 @@ jobs: | |
name: minijson-${{ runner.os }}-${{ runner.arch }} | ||
path: ./dist | ||
|
||
merge-artifacts: | ||
Release: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Merge Artifacts | ||
uses: actions/upload-artifact/merge@v4 | ||
with: | ||
delete-merged: true | ||
|
||
- name: Download All Artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: merged-artifacts | ||
path: dist/ | ||
|
||
- name: Prepare | ||
run: | | ||
chmod +x ./dist/*/minijson | ||
zip -9 -j ./dist/minijson-windows-x64.zip ./dist/win32-x64/minijson.exe | ||
tar -czf ./dist/minijson-macos-x64.tar.gz -C ./dist/darwin-x64 minijson | ||
tar -czf ./dist/minijson-macos-arm64.tar.gz -C ./dist/darwin-arm64 minijson | ||
tar -czf ./dist/minijson-linux-x64.tar.gz -C ./dist/linux-x64 minijson | ||
- name: Draft the release | ||
if: startsWith(github.ref, 'refs/tags/') | ||
uses: meeDamian/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
gzip: folders | ||
draft: true | ||
files: > | ||
dist/minijson-windows-x64.zip | ||
dist/minijson-macos-x64.tar.gz | ||
dist/minijson-macos-arm64.tar.gz | ||
dist/minijson-linux-x64.tar.gz | ||
- name: Publish to npm | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: pnpm publish --access public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters