chore: Bug fixes #42
This file contains hidden or 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 NPM package | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
registry-url: 'https://registry.npmjs.org' | |
node-version: '20' | |
- name: Install pnpm | |
run: | | |
npm install -g pnpm | |
pnpm install | |
- name: Get next version via Semantic Release dry run | |
id: dry-run | |
run: | | |
version=$(npx semantic-release --dry-run | grep "Next release version:" | awk '{print $4}') | |
echo "::set-output name=NEXT_VERSION::$version" | |
- name: Run bump.sh to update version in package.json | |
run: | | |
chmod +x ./script/bump.sh | |
./script/bump.sh ${{ steps.dry-run.outputs.NEXT_VERSION }} | |
- name: Print updated version | |
run: | | |
updated_version=$(jq -r .version ./package/package.json) | |
echo "Updated version in package.json: $updated_version" | |
# - name: (@steambrew/client) Install dependencies | |
# run: cd client && pnpm install | |
# - name: (@steambrew/client) Build project | |
# env: | |
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# run: cd client && pnpm run build | |
# - name: (@steambrew/client) Publish to npm | |
# env: | |
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# run: cd client && npm publish | |
# - name: (@steambrew/webkit) Install dependencies | |
# run: cd webkit && pnpm install | |
# - name: (@steambrew/webkit) Build project | |
# env: | |
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# run: cd webkit && pnpm run build | |
# - name: (@steambrew/webkit) Publish to npm | |
# env: | |
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# run: cd webkit && npm publish | |
# - name: (@steambrew/api) Install dependencies | |
# run: cd api && pnpm install | |
# - name: (@steambrew/api) Build project | |
# env: | |
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# run: cd api && pnpm run build | |
# - name: (@steambrew/api) Publish to npm | |
# env: | |
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# run: cd api && npm publish | |
- name: (semantic-release) Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
npx semantic-release |