1.5.2 #10
Workflow file for this run
This file contains 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: Release | |
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+*' | |
env: | |
NODE_VERSION: 20 | |
jobs: | |
test: | |
uses: ./.github/workflows/test.yml | |
release: | |
name: Create Release | |
concurrency: | |
group: ${{ github.workflow }}-github-${{ github.ref_name }} | |
cancel-in-progress: true | |
environment: | |
name: release | |
url: https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }} | |
runs-on: ubuntu-latest | |
needs: | |
- test | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Changelog | |
uses: ardalanamini/auto-changelog@v4 | |
id: changelog | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
body: | | |
${{ steps.changelog.outputs.changelog }} | |
prerelease: ${{ steps.changelog.outputs.prerelease }} | |
publish-npm: | |
name: Publish to NPM | |
concurrency: | |
group: ${{ github.workflow }}-npm-${{ github.ref_name }} | |
cancel-in-progress: true | |
environment: | |
name: npm | |
url: https://www.npmjs.com/package/eslint-config-noir | |
permissions: | |
contents: read | |
id-token: write | |
runs-on: ubuntu-latest | |
needs: | |
- release | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use PNPM | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Use Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v3 | |
with: | |
cache: pnpm | |
node-version: ${{ env.NODE_VERSION }} | |
registry-url: https://registry.npmjs.org/ | |
- name: Install dependencies | |
run: pnpm i | |
- name: Publish the package | |
run: pnpm publish --no-git-checks | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
publish-gpr: | |
name: Publish to GitHub Packages | |
concurrency: | |
group: ${{ github.workflow }}-gpr-${{ github.ref_name }} | |
cancel-in-progress: true | |
environment: | |
name: gpr | |
url: https://github.com/${{ github.repository }}/packages | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
runs-on: ubuntu-latest | |
needs: | |
- release | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use PNPM | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Use Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v3 | |
with: | |
cache: pnpm | |
node-version: ${{ env.NODE_VERSION }} | |
registry-url: https://npm.pkg.github.com/ | |
scope: '@ardalanamini' | |
- run: sed -i 's/"name":\ "eslint-config-noir"/"name":\ "@ardalanamini\/eslint-config-noir"/g' package.json | |
- name: Install dependencies | |
run: pnpm i | |
- name: Publish the package | |
run: pnpm publish --no-git-checks | |
env: | |
NODE_AUTH_TOKEN: ${{ github.token }} |