0.1.5 #18
Workflow file for this run
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
name: Publish package | |
on: | |
release: | |
types: [created] | |
jobs: | |
publish-gpr: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
registry-url: "https://registry.npmjs.org" | |
- run: yarn install | |
- name: Prepare the release | |
run: yarn prepare:release devs.near ${{secrets.DEVS_SIGNER_PRIVATE_KEY}} | |
- name: Commit and push updated package.json (nearfs cid) | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add package.json | |
# Check if there are changes to commit | |
if ! git diff --cached --quiet; then | |
git commit -m "Update package.json with new nearfs cid [skip ci]" | |
git push origin HEAD:main | |
else | |
echo "No changes to commit." | |
fi | |
- name: Publish to NPM | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |