-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Matt Gordon
committed
Apr 23, 2024
1 parent
80107a9
commit 84d4520
Showing
8 changed files
with
122 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: 1 | ||
services: | ||
github-action: | ||
policies: | ||
- dependabot | ||
- packages-read | ||
- semantic-release |
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,2 @@ | ||
# team integrations owns all code in this repository by default | ||
* @contentful/team-integrations |
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,23 @@ | ||
## Purpose | ||
|
||
<!-- Why are we introducing this component? What is the story/background for it? --> | ||
|
||
## Description | ||
|
||
<!--What does this component do? Where is the component expected to be used outside of this component library? --> | ||
|
||
## Testing steps | ||
|
||
<!-- Where can the user find this component to test its functionality? --> | ||
|
||
## Breaking Changes | ||
|
||
<!-- Are there any changes to be aware of that would break current production build? --> | ||
|
||
## Design, Documentation, and/or References | ||
|
||
<!-- What original designs are associated with this component? Where can we get more insights about this change? (Tickets, wiki pages or links to other places/docs -- no private/internal links please) --> | ||
|
||
## Deployment | ||
|
||
<!-- (Optional) Are there any deployment-related tasks, concerns or risks we should be mindful of? --> |
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,65 @@ | ||
name: Node.js Package | ||
|
||
on: | ||
push: | ||
branches: ['main'] | ||
pull_request: | ||
types: [opened, synchronize] | ||
branches: ['main'] | ||
|
||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # to be able to publish a GitHub release | ||
issues: write # to be able to comment on released issues | ||
pull-requests: write # to be able to comment on released pull requests | ||
id-token: write # to enable use of OIDC for npm provenance | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: 'Retrieve NPM Token' | ||
id: vault | ||
uses: hashicorp/vault-action@v2.4.3 | ||
with: | ||
url: ${{ secrets.VAULT_URL }} | ||
role: ${{ github.event.repository.name }}-github-action | ||
method: jwt | ||
path: github-actions | ||
exportEnv: false | ||
secrets: | | ||
secret/data/github/github_packages_write GITHUB_PACKAGES_WRITE_TOKEN | GITHUB_PACKAGES_WRITE_TOKEN ; | ||
github/token/integration-frontend-toolkit-semantic-release token | GITHUB_TOKEN ; | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
registry-url: 'https://npm.pkg.github.com' | ||
scope: '@contentful' | ||
always-auth: true | ||
|
||
- name: 'Create GH .npmrc' | ||
shell: bash | ||
run: | | ||
echo -e "//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}\n@contentful:registry=https://npm.pkg.github.com\nalways-auth=true" > .npmrc | ||
env: | ||
GITHUB_TOKEN: ${{ steps.vault.outputs.GITHUB_PACKAGES_WRITE_TOKEN }} | ||
|
||
- run: npm ci | ||
- run: npm run build | ||
- run: npm test | ||
|
||
- run: | | ||
npx semantic-release | ||
env: | ||
GITHUB_TOKEN: ${{ steps.vault.outputs.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ steps.vault.outputs.GITHUB_PACKAGES_WRITE_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v19.6.0 |
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,4 @@ | ||
node_modules/ | ||
build/ | ||
.coverage/ | ||
.cache/ |
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,11 @@ | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: Component | ||
metadata: | ||
name: vercel-toolkit | ||
annotations: | ||
github.com/project-slug: contentful/vercel-toolkit | ||
|
||
spec: | ||
type: library | ||
lifecycle: production | ||
owner: group:team-integrations |
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