Skip to content

Commit

Permalink
Merge pull request #10 from lottie/mf/fix-release-4
Browse files Browse the repository at this point in the history
ci: use changeset default action
  • Loading branch information
Aidosmf authored May 24, 2024
2 parents c453ce3 + d7b8d3b commit 1933a5b
Showing 1 changed file with 11 additions and 30 deletions.
41 changes: 11 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,36 @@ name: Release

on:
push:
branches: [main]
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- name: Checkout
- name: Checkout Repo
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Node.js ${{ matrix.node-version }}
- name: Setup Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: "https://npm.pkg.github.com"
node-version: 20.x

- name: Install dependencies
run: yarn install
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Install Dependencies
run: yarn

- name: Build
run: yarn build
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Create .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
//npm.pkg.github.com/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release Pull Request or Publish to GitHub registry
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
version: yarn changelog:version
publish: yarn changelog:publish
env:
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 1933a5b

Please sign in to comment.