This repository has been archived by the owner on Aug 6, 2024. It is now read-only.
-
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.
chore(merge): merge chore branch 'chore/setup-deployment-environment'.
* build(npm): adds semantic release package. * build(npm): adds semantic release plugins. * feat(config): adds configuration for semantic release for use in CI. * fix(config): restricts release config application to main branch. * build(npm): adds husky package. * style(cql): Implements husky for pre-commit hooks. * ci(GitHubActions): Adds workflows to automate application version and deployment. - Implements a release workflow. - Implements a deployment workflow triggered by new releases.
- Loading branch information
1 parent
0b8f1b9
commit 5d06f88
Showing
7 changed files
with
8,313 additions
and
2,385 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,20 @@ | ||
name: deploy to production. | ||
env: | ||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: install Vercel CLI. | ||
run: npm install --global vercel@latest | ||
- name: pull Vercel environment information. | ||
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | ||
- name: build project artifacts. | ||
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | ||
- name: deploy project artifacts to Vercel. | ||
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_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,33 @@ | ||
name: release | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
release: | ||
env: | ||
HUSKY: 0 | ||
name: release | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
issues: write | ||
steps: | ||
- name: checkout code. | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: setup Node.js. | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "20.12.0" | ||
- name: install dependencies. | ||
run: npm ci | ||
- name: publish release. | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: npx 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,6 @@ | ||
// Skip Husky install in production and CI | ||
if (process.env.NODE_ENV === 'production' || process.env.CI === 'true') { | ||
process.exit(0) | ||
} | ||
const husky = (await import('husky')).default | ||
console.log(husky()) |
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 @@ | ||
npm run lint |
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 @@ | ||
{ | ||
"branches": ["main"], | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
{ | ||
"preset": "angular", | ||
"releaseRules": [ | ||
{"type": "feat", "release": "minor"}, | ||
{"type": "fix", "release": "patch"}, | ||
{"type": "chore", "release": false} | ||
], | ||
"parserOpts": { | ||
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES"] | ||
} | ||
}, | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/changelog", | ||
{ | ||
"changelogFile": "docs/CHANGELOG.md", | ||
"changelogTitle": "# Changelog" | ||
}, | ||
"@semantic-release/github", | ||
{ | ||
"assets": ["package.json", "package-lock.json", "CHANGELOG.md"], | ||
"message": "chore(release): 🚀 ${nextRelease.version}. [skip ci]" | ||
}, | ||
"@semantic-release/npm", | ||
{ | ||
"npmPublish": false | ||
}, | ||
"@semantic-release/git" | ||
], | ||
"repositoryUrl": "https://github.com/mango-habanero/gallery.git" | ||
} |
Oops, something went wrong.