-
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.
Sets up continuous deployment with GitVersion. Renames `ci` to `pipeline` to match the mental model. Update contributing docs.
- Loading branch information
Showing
5 changed files
with
65 additions
and
11 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,4 +1,4 @@ | ||
name: CI | ||
name: Pipeline | ||
|
||
on: | ||
push: | ||
|
@@ -10,9 +10,24 @@ jobs: | |
Build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
outputs: | ||
GitVersion_SemVer: ${{ steps.GitVersion.outputs.GitVersion_SemVer }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Full depth (not shallow) for GitVersion and better relevancy of Sonar analysis | ||
|
||
- name: Set up GitVersion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
versionSpec: 6.x | ||
|
||
- name: Execute GitVersion | ||
id: GitVersion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
useConfigFile: true | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
|
@@ -54,10 +69,10 @@ jobs: | |
cache: npm | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Install production | ||
run: npm ci --include prod | ||
- name: Install | ||
run: npm install --omit=dev | ||
|
||
- name: Build production | ||
- name: Build | ||
run: npm run build | ||
|
||
- name: Run css-typed (the test) | ||
|
@@ -71,3 +86,40 @@ jobs: | |
node dist/main.js "$RUNNER_TEMP/*.css" --dashes | ||
diff --strip-trailing-cr -uI '//.*' src/fixtures/kebab-case/kebab-case-dashes.d.css.ts "$RUNNER_TEMP/kebab-case.d.css.ts" | ||
Publish: | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
name: Publish | ||
needs: | ||
- Build # For version variable | ||
- Test # Requires passing tests | ||
runs-on: ubuntu-latest | ||
env: | ||
GitVersion_SemVer: ${{needs.Build.outputs.GitVersion_SemVer}} | ||
permissions: | ||
contents: write | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
cache: npm | ||
node-version-file: .node-version | ||
registry-url: https://registry.npmjs.org | ||
|
||
- name: Set version | ||
run: sed -i 's/0.0.0-gitversion/${{ env.GitVersion_SemVer }}/g' package.json | ||
|
||
- name: Install | ||
run: npm install --omit=dev | ||
|
||
- name: Publish | ||
run: npm publish --provenance --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: git tag | ||
run: | | ||
git tag v${{ env.GitVersion_SemVer }} | ||
git push origin tag v${{ env.GitVersion_SemVer }} |
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,2 @@ | ||
workflow: GitHubFlow/v1 | ||
mode: ContinuousDeployment |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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