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

test: Migrate CI to GitHub Actions [SDK-4451] #372

Merged
merged 5 commits into from
Sep 20, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update publish.yml
  • Loading branch information
evansims committed Sep 18, 2023
commit 24a1e38920ccf890368f1b14ddd2c23a973e9a8e
32 changes: 2 additions & 30 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
version:
description: The version being published. This should be a valid semver version, such as `1.0.0`.
required: true
default: ''
default: ""
type: string
dry-run:
type: boolean
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:

name: Publish to NPM
runs-on: ubuntu-latest
environment: 'release'
environment: "release"

steps:
- name: Checkout code
Expand All @@ -107,31 +107,3 @@ jobs:
run: npm publish --provenance --tag ${{ needs.configure.outputs.vtag }} ${{ needs.configure.outputs.dry-run }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

publish-gh:
needs:
- configure
- publish-npm # Don't publish to GitHub Packages until publishing to NPM is successfully completed

name: Publish to GitHub Packages
runs-on: ubuntu-latest
environment: 'release'

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://npm.pkg.github.com'
cache: npm

- name: Install dependencies
run: npm ci

- name: Publish release to GitHub Packages
run: npm publish --provenance --tag ${{ needs.configure.outputs.vtag }} ${{ needs.configure.outputs.dry-run }}
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}