Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish to GitHub packages in addition to npmjs #1330

Merged
merged 1 commit into from
Oct 24, 2024
Merged
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
26 changes: 24 additions & 2 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,39 @@ jobs:
uses: actions/checkout@v4
- name: "Fetch unshallow repo"
run: git fetch --prune --unshallow
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
registry-url: 'https://registry.npmjs.org'
- name: Set up auth for GitHub packages
run: |
npm config set "//npm.pkg.github.com/:_authToken" "\${NODE_AUTH_TOKEN}"
- name: Update npm packages to latest version
working-directory: ./npm/@fastly/cli
run: npm install && npm version "${{ github.ref_name }}" --allow-same-version
- name: Publish npm packages
- name: Publish packages to npmjs.org
working-directory: ./npm/@fastly
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
for dir in *; do
(
echo $dir
cd $dir
npm publish --access=public
)
done
- name: Publish packages to GitHub packages
working-directory: ./npm/@fastly
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm config set "@fastly:registry" "https://npm.pkg.github.com/"
for dir in *; do
(
echo $dir
cd $dir
npm config set "//registry.npmjs.org/:_authToken" "${{ secrets.NPM_TOKEN }}"
npm publish --access=public
)
done
Loading