2022-08-24 15:03:06 +00:00
|
|
|
name: "Release packages"
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
release-packages:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- uses: pnpm/action-setup@v2.2.2
|
|
|
|
with:
|
|
|
|
version: 7
|
|
|
|
|
|
|
|
- name: "Setup node"
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: "16"
|
2022-08-25 14:08:04 +00:00
|
|
|
registry-url: 'https://registry.npmjs.org'
|
2022-08-24 15:03:06 +00:00
|
|
|
|
|
|
|
- name: "Build packages"
|
|
|
|
run: |
|
|
|
|
pnpm i
|
|
|
|
pnpm -r build
|
|
|
|
|
|
|
|
- name: "Publish to npmjs.com"
|
|
|
|
run: |
|
2022-08-25 15:08:42 +00:00
|
|
|
result=$(pnpm --no-git-checks -r publish -filter '@fluencelabs/*' --access public)
|
2022-08-24 15:03:06 +00:00
|
|
|
if [[ $result == "There are no new packages that should be published" ]]
|
|
|
|
then
|
|
|
|
echo ERROR: no packages have been published. Did you forget to bump version?
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
env:
|
|
|
|
CI: true
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
|