Skip to content
Merged
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
12 changes: 6 additions & 6 deletions .github/workflows/release-alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
# paths-ignore:
# - '.github/**'

permissions:
contents: read
id-token: write

jobs:
release:
runs-on: ubuntu-latest
Expand All @@ -15,10 +19,10 @@ jobs:
- uses: actions/checkout@v6
- name: Extract version from branch name
id: extract_version
run: echo "::set-output name=version::$(echo ${{ github.ref }} | sed -n 's/refs\/heads\/releases\/\(.*\)-alpha/\1/p')"
run: echo "version=$(echo ${{ github.ref }} | sed -n 's/refs\/heads\/releases\/\(.*\)-alpha/\1/p')" >> "$GITHUB_OUTPUT"
- name: Extract rc from package.json
id: next_extract_rc
run: echo "::set-output name=rc::$(npm show rollup-plugin-react-scoped-css versions --json | grep -E '${{ steps.extract_version.outputs.version }}-alpha' | sed 's/"//g; s/,//g' | sort -V | tail -n 1 | tail | awk -F '-alpha\\.' '{if (NF > 1) {print $2 + 1} else {print 0}}')"
run: echo "rc=$(npm show rollup-plugin-react-scoped-css versions --json | grep -E '${{ steps.extract_version.outputs.version }}-alpha' | sed 's/"//g; s/,//g' | sort -V | tail -n 1 | tail | awk -F '-alpha\\.' '{if (NF > 1) {print $2 + 1} else {print 0}}')" >> "$GITHUB_OUTPUT"
- name: Use Node.js 24.x
uses: actions/setup-node@v6
with:
Expand All @@ -33,8 +37,4 @@ jobs:
echo "Version: ${{ steps.extract_version.outputs.version }}-alpha.${{ steps.next_extract_rc.outputs.rc }}"
npm version ${{ steps.extract_version.outputs.version }}-alpha.${{ steps.next_extract_rc.outputs.rc }} --no-git-tag-version
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --access public --tag alpha

9 changes: 6 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ on:
paths-ignore:
- '.github/**'

permissions:
contents: write
issues: write
pull-requests: write
id-token: write

jobs:
release:
runs-on: ubuntu-latest
Expand All @@ -24,7 +30,4 @@ jobs:
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release


1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

Loading