Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
ci: Fix release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ardalanamini committed Oct 29, 2022
1 parent f0912b7 commit 41e8dc0
Showing 1 changed file with 21 additions and 25 deletions.
46 changes: 21 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,22 @@ jobs:
${{ steps.changelog.outputs.changelog }}
prerelease: ${{ steps.changelog.outputs.prerelease }}

publish-npm:
name: Publish to NPM
publish-gpr:
name: Publish to GitHub Packages

needs:
- release

permissions:
contents: read
packages: write

environment:
name: npm
url: https://www.npmjs.com/package/@foxify/config
name: gpr
url: https://github.com/${{ github.repository }}/pkgs/npm/config

concurrency:
group: ${{ github.workflow }}-npm-${{ github.ref_name }}
group: ${{ github.workflow }}-gpr-${{ github.ref_name }}
cancel-in-progress: true

runs-on: ubuntu-latest
Expand All @@ -74,34 +78,31 @@ jobs:
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
registry-url: https://registry.npmjs.org/
registry-url: https://npm.pkg.github.com/
scope: '@foxifyjs'

- run: sed -i 's/@foxify\/config/@foxifyjs\/config/g' package.json

- name: Install dependencies
run: pnpm i

- run: pnpm build:hybrid

- name: Publish the package
run: pnpm publish --tag ${{ needs.release.outputs.release-id }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ github.token }}

publish-gpr:
name: Publish to GitHub Packages
publish-npm:
name: Publish to NPM

needs:
- release

permissions:
contents: read
packages: write

environment:
name: gpr
url: https://github.com/${{ github.repository }}/pkgs/npm/config
name: npm
url: https://www.npmjs.com/package/@foxify/config

concurrency:
group: ${{ github.workflow }}-gpr-${{ github.ref_name }}
group: ${{ github.workflow }}-npm-${{ github.ref_name }}
cancel-in-progress: true

runs-on: ubuntu-latest
Expand All @@ -119,17 +120,12 @@ jobs:
with:
cache: pnpm
node-version: ${{ env.NODE_VERSION }}
registry-url: https://npm.pkg.github.com/
scope: '@foxifyjs'

- run: sed -i 's/@foxify\/config/@foxifyjs\/config/g' package.json
registry-url: https://registry.npmjs.org/

- name: Install dependencies
run: pnpm i

- run: pnpm build:hybrid

- name: Publish the package
run: pnpm publish --tag ${{ needs.release.outputs.release-id }}
env:
NODE_AUTH_TOKEN: ${{ github.token }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 41e8dc0

Please sign in to comment.