diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 70bf4ae..6123ade 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }}