-
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.
⬆️ Upgrade dependencies + automatic publish (#8)
Removes `ci` and `release` workflows in favor of `pipeline` which automatically publishes the package. Uses GitVersion for automatic versioning. Upgrades dependencies during this change and moves the version to `rc` prior to official 1.0.
- Loading branch information
Showing
5 changed files
with
240 additions
and
198 deletions.
There are no files selected for viewing
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Pipeline | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
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 | ||
|
||
- 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: | ||
overrideConfig: | | ||
workflow=GitHubFlow/v1 | ||
mode=ContinuousDeployment | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
cache: npm | ||
node-version-file: .node-version | ||
|
||
- name: Install | ||
run: npm ci | ||
|
||
- name: CI build | ||
run: npm run ci-build | ||
|
||
Publish: | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
name: Publish | ||
needs: | ||
- Build # For version variable | ||
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 | ||
|
||
- name: Set version | ||
run: sed -i 's/0.0.0-gitversion/${{ env.GitVersion_SemVer }}/g' package.json | ||
|
||
- name: Install | ||
run: npm install | ||
|
||
- 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 was deleted.
Oops, something went wrong.
Oops, something went wrong.