mirror of
https://github.com/fluencelabs/aqua.git
synced 2024-12-04 22:50:18 +00:00
CI: publish to NPM as 'aqua' & 'aqua-cli' (#242)
This commit is contained in:
parent
3d85f54580
commit
38fb824b68
32
.github/workflows/release.yml
vendored
32
.github/workflows/release.yml
vendored
@ -15,6 +15,11 @@ jobs:
|
||||
### Setup
|
||||
- uses: olafurpg/setup-scala@v10
|
||||
|
||||
- name: Download jq
|
||||
run: |
|
||||
curl -L https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 -o /usr/local/bin/jq
|
||||
chmod +x /usr/local/bin/jq
|
||||
|
||||
### Update & build
|
||||
- name: Assembly
|
||||
run: sbt cli/assembly
|
||||
@ -60,12 +65,37 @@ jobs:
|
||||
- run: npm version ${{ env.VERSION }}
|
||||
working-directory: ./npm
|
||||
|
||||
- run: npm publish --access public
|
||||
- name: Publish to NPM as aqua-cli
|
||||
run: npm publish --access public
|
||||
working-directory: ./npm
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
- name: Publish to NPM as aqua
|
||||
run: |
|
||||
CONTENTS="$(jq '.name = "@fluencelabs/aqua"' package.json)"
|
||||
echo "$CONTENTS" > package.json
|
||||
npm publish --access public
|
||||
working-directory: ./npm
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
### create release
|
||||
- name: Remove tag if exists
|
||||
uses: actions/github-script@v3
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
try {
|
||||
await github.git.deleteRef({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
ref: "tags/${{ env.BASE_VERSION }}"
|
||||
})
|
||||
} catch (e) {
|
||||
console.log("The ${{ env.BASE_VERSION }} tag doesn't exist yet: " + e)
|
||||
}
|
||||
|
||||
- name: Push tag ${{ env.BASE_VERSION }}
|
||||
id: tag_version
|
||||
uses: mathieudutour/github-tag-action@v5.5
|
||||
|
Loading…
Reference in New Issue
Block a user