-
Notifications
You must be signed in to change notification settings - Fork 389
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
Showing
8 changed files
with
25,549 additions
and
16,034 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 |
---|---|---|
@@ -1,25 +1,76 @@ | ||
name: Create GitHub Release | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
id-token: write # For publishing to npm using --provenance | ||
push: | ||
branches: [ main ] | ||
|
||
### TODO: Replace instances of './.github/workflows/' w/ `auth0/dx-sdk-actions/workflows/` and append `@latest` after the common `dx-sdk-actions` repo is made public. | ||
### TODO: Also remove `get-prerelease`, `get-release-notes`, `get-version`, `npm-publish`, `release-create`, and `tag-exists` actions from this repo's .github/actions folder once the repo is public. | ||
### TODO: Also remove `npm-release` workflow from this repo's .github/workflows folder once the repo is public. | ||
workflow_dispatch: | ||
|
||
jobs: | ||
cache-node-modules: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '12.x' | ||
env: | ||
SSH_PRIV_KEY: '${{ secrets.ARIAMANUEL_SSH }}' | ||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
id: cache-dependencies | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- name: Copy SSH key | ||
shell: sh | ||
run: | | ||
mkdir -p ~/.ssh | ||
chmod 700 ~/.ssh | ||
echo "$SSH_PRIV_KEY" > ~/.ssh/id_rsa | ||
chmod 600 ~/.ssh/id_rsa | ||
- name: Install Dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
npm install | ||
release: | ||
uses: ./.github/workflows/npm-release.yml | ||
with: | ||
node-version: 18 | ||
require-build: false | ||
secrets: | ||
npm-token: ${{ secrets.NPM_TOKEN }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
runs-on: ubuntu-latest | ||
needs: [cache-node-modules] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.ARIAMANUEL_PAT }} | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '12' | ||
registry-url: 'https://npm.pkg.github.com' | ||
scope: '@Hello-Aria' | ||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
id: cache-dependencies | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- run: npm run build | ||
- run: npm run release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_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,27 @@ | ||
{ | ||
"branches": [ | ||
"main", | ||
{ "name": "alpha", "prerelease": true }, | ||
{ "name": "beta", "prerelease": true }, | ||
{ "name": "rc", "prerelease": true } | ||
], | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
[ | ||
"@semantic-release/changelog", | ||
{ | ||
"changelogFile": "CHANGELOG.md" | ||
} | ||
], | ||
"@semantic-release/npm", | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": ["CHANGELOG.md", "package.json"], | ||
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
} | ||
], | ||
"@semantic-release/github" | ||
] | ||
} |
Oops, something went wrong.