-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: split cd actions for analytics and shared gf-375 (#433)
* chore: add cd action to publish analytics script to npm gf-375 * chore: add repository url to analytics package.json gf-375 * chore: update analytics cd action gf-375 * chore: update analytics cd action gf-375 * feat: trigger analytics release gf-375 * feat: update secrets in analytics cd action gf-375 * fix: analytics build path gf-375 * feat: split cd actions for analytics and shared gf-375
- Loading branch information
Showing
4 changed files
with
116 additions
and
5 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
name: Continuous Delivery Shared | ||
|
||
env: | ||
ARTIFACT_NAME: build | ||
ARTIFACT_PATH: ./ | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
NPM_TOKEN: | ||
required: true | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: cd-${{ github.ref }} | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
dependencies: | ||
name: Install Dependencies | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Code Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install NodeJS | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: .nvmrc | ||
|
||
- name: Cache Dependencies | ||
id: cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
**/node_modules | ||
key: cd-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
cd- | ||
- name: Install Dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: npm install | ||
|
||
build: | ||
name: Code Building | ||
needs: dependencies | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Source Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install NodeJS | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: .nvmrc | ||
|
||
- name: Restore Dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
**/node_modules | ||
key: cd-${{ hashFiles('**/package-lock.json') }} | ||
|
||
- name: Code Building | ||
run: | | ||
npm run build:shared | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.ARTIFACT_NAME }} | ||
path: ${{ env.ARTIFACT_PATH }} | ||
|
||
npm-publish: | ||
name: Publish to NPM | ||
needs: build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
steps: | ||
- name: Checkout Source Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install NodeJS | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: .nvmrc | ||
registry-url: https://registry.npmjs.org | ||
|
||
- name: Download Artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ env.ARTIFACT_NAME }} | ||
path: ${{ env.ARTIFACT_PATH }} | ||
|
||
- name: Publish | ||
working-directory: ${{ env.ARTIFACT_PATH }} | ||
run: | | ||
npm publish --provenance --access public --workspace packages/shared | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
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
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