-
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.
Merge changes from v2.2.0-next.1 into main (#30)
- Loading branch information
Showing
467 changed files
with
16,149 additions
and
12,511 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,34 @@ | ||
name: 📝 Annual License Update | ||
|
||
on: | ||
# This workflow runs on Jan 1st every year | ||
schedule: | ||
- cron: "0 0 1 1 *" | ||
|
||
jobs: | ||
update-license: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # to checkout the code and update the LICENSE file | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.SEMANTIC_RELEASE_TOKEN }} | ||
|
||
- name: Update Copyright Date Range in LICENSE | ||
run: | | ||
function log_error() { echo '🚨LICENSE UPDATE FAILED🚨'; exit 1; } | ||
year=$(date +%Y) | ||
sed -i -E \ | ||
"s/(Copyright © [0-9]{4})-[0-9]{4}(.*)/\1-$year\2/" ./LICENSE || log_error | ||
git config --global user.email "${{ github.actor }}@users.noreply.github.com" | ||
git config --global user.name "${{ github.actor }}" | ||
git add ./LICENSE | ||
git commit -m \ | ||
"chore(license): update copyright date range to include $year" || log_error | ||
echo 'License Copyright date range successfully updated.' |
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,33 @@ | ||
name: 🚀 CI/CD Workflow | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize] # default PR types | ||
branches: [main, next] | ||
paths: ["src/**/*", "package*.json"] | ||
push: | ||
branches: [main, next] | ||
paths: ["src/**/*", "package*.json"] | ||
# This workflow can be manually triggered | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
name: 🧪 Test | ||
uses: ./.github/workflows/test.yaml | ||
secrets: inherit | ||
permissions: | ||
contents: write # to checkout the code and merge bot-PRs | ||
pull-requests: write # to add coverage reports to the PR | ||
statuses: write # to update commit status | ||
|
||
release: | ||
name: 📦 Release | ||
needs: test # run job if event=push and tests passed | ||
if: github.event_name == 'push' && needs.test.outputs.success == 'true' | ||
uses: ./.github/workflows/release.yaml | ||
secrets: inherit | ||
permissions: | ||
attestations: write # to generate artifact attestations for dist assets | ||
contents: write # to create a release | ||
issues: write # to be able to comment on released issues |
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,62 @@ | ||
name: Publish API Schema | ||
|
||
on: | ||
# This workflow runs for both releases and pre-releases | ||
release: { types: [published] } | ||
# This workflow can be manually triggered | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish-open-api-schema: | ||
name: Publish OpenAPI Schema | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: ".nvmrc" | ||
|
||
- name: Setup Publication Tools | ||
run: npm ci --include=dev | ||
|
||
- name: Run Publication Script | ||
env: | ||
SWAGGERHUB_API_KEY: ${{ secrets.SWAGGERHUB_API_KEY }} | ||
run: | | ||
# If prerelease is false, use --setdefault flag to update the default version | ||
should_set_default=$( | ||
[ ${{ github.event.release.prerelease }} == 'false' ] && | ||
echo '--setdefault' || | ||
echo '' | ||
) | ||
scripts/cicd.publish-schema-open-api.sh \ | ||
--version=${{ github.event.release.tag_name }} \ | ||
$should_set_default | ||
publish-graphql-schema: | ||
name: Publish GraphQL Schema | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: ".nvmrc" | ||
|
||
- name: Setup Publication Tools | ||
run: npm ci --include=dev | ||
|
||
- name: Run Publication Script | ||
env: | ||
APOLLO_KEY: ${{ secrets.APOLLO_STUDIO_GRAPH_API_KEY }} | ||
run: | | ||
# If prerelease is false, then variant is prod, else variant is staging | ||
graph_variant=$( | ||
[ ${{ github.event.release.prerelease }} == 'false' ] && | ||
echo prod || | ||
echo staging | ||
) | ||
scripts/cicd.publish-schema-graphql.sh --variant=$graph_variant |
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,16 +1,43 @@ | ||
name: Release Workflow | ||
|
||
# This workflow is called by the Test workflow when all tests pass. | ||
name: 📦 Release Workflow | ||
|
||
on: | ||
workflow_dispatch: | ||
# This workflow is called by the CI/CD Workflow (see ./cicd.yaml) | ||
workflow_call: | ||
secrets: | ||
SEMANTIC_RELEASE_TOKEN: { required: true } | ||
# This workflow can be manually triggered | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
uses: Nerdware-LLC/reusable-action-workflows/.github/workflows/release.yaml@main | ||
secrets: | ||
SEMANTIC_RELEASE_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }} | ||
name: 📦 Release | ||
runs-on: ubuntu-latest | ||
permissions: | ||
attestations: write # to generate artifact attestations for dist assets | ||
contents: write # to create a release | ||
issues: write # to be able to comment on released issues | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: ".nvmrc" | ||
|
||
- name: Install Dependencies | ||
run: npm ci --include=dev | ||
|
||
- name: Build Dist Assets | ||
run: npm run build | ||
|
||
- name: Run Semantic-Release | ||
id: semantic-release | ||
uses: cycjimmy/semantic-release-action@v4 | ||
with: | ||
extra_plugins: | | ||
@aensley/semantic-release-openapi@1.1.8 | ||
@semantic-release/changelog@6.0.3 | ||
@semantic-release/git@10.0.1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }} |
Oops, something went wrong.