Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions .github/workflows/release-next.yml

This file was deleted.

33 changes: 30 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
name: Release
on:
release:
types: [created]
types: [released]
push:
branches:
- next

permissions:
id-token: write
contents: read

jobs:
release:
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'released'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
Expand All @@ -15,5 +24,23 @@ jobs:
- run: yarn install
- run: yarn build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

release-next:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/next'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: yarn
registry-url: 'https://registry.npmjs.org'
- name: Set outputs
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- run: git config --global user.name "GitHub CD bot"
- run: git config --global user.email "info@networkteam.com"
- run: npm version prerelease --preid=${{ steps.vars.outputs.sha_short }}
- run: yarn install
- run: yarn build
- run: npm publish --tag next