-
Notifications
You must be signed in to change notification settings - Fork 1
Add build workflow #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
29e3230
Add build workflow
davide-pi-egits c4b555c
Add build badge in readme
davide-pi-egits fed7408
Add trigger on tags
davide-pi-egits 861a4bc
Minor fix on trigger conditions
davide-pi-egits cc41dd1
Add versioning and publish to npm steps
davide-pi-egits 2b5bcaa
Try fix for install step
davide-pi-egits edcaa74
Change gitversion steps to bash/pwsh code
davide-pi-egits 2e4a42b
Fix indentation
davide-pi-egits 0903735
Fix indentation... again
davide-pi-egits 5a3f210
Add global to gitversion installation
davide-pi-egits bf0b71d
Try to fix the run of gitversion without specifing extension
davide-pi-egits fe33a9c
Try use embedded commands of gittools
davide-pi-egits a0ce644
Add version of the tool
davide-pi-egits cdce35a
Disable shallow clones
davide-pi-egits 87d9739
Fix indentation
davide-pi-egits e30015b
Try fix npm versioning using computed version
davide-pi-egits b6369e0
npm push only on tags
davide-pi-egits File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,49 @@ | ||
| name: Build | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - "main" | ||
| tags: | ||
| - '[0-9]+.[0-9]+.[0-9]+' | ||
| pull_request: | ||
| branches: | ||
| - "main" | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build & Publish | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Install GitVersion | ||
| uses: gittools/actions/gitversion/setup@v3.2.1 | ||
|
|
||
| - name: Determine Version | ||
| id: gitversion | ||
| uses: gittools/actions/gitversion/execute@v3.2.1 | ||
| with: | ||
| useConfigFile: true | ||
| configFilePath: GitVersion.yml | ||
|
|
||
| - name: Install NPM Packages | ||
| shell: pwsh | ||
| run: npm i | ||
|
|
||
| - name: Build Project | ||
| shell: pwsh | ||
| run: npm run build | ||
|
|
||
| - name: Publish to NPM | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
| shell: pwsh | ||
| run: | | ||
| npm version ${{ steps.gitversion.outputs.fullSemVer }} --no-git-tag-version | ||
| npm publish --access public | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
This file contains hidden or 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,28 @@ | ||
| mode: ContinuousDelivery | ||
| branches: | ||
| main: | ||
| label: beta | ||
| increment: Minor | ||
| regex: ^main$ | ||
| is-main-branch: true | ||
| source-branches: [] | ||
| pull-request: | ||
| label: alpha | ||
| increment: Minor | ||
| feature: | ||
| label: alpha | ||
| increment: Minor | ||
| regex: ^feature/? | ||
| is-main-branch: false | ||
| source-branches: | ||
| - main | ||
| hotfix: | ||
| label: alpha | ||
| increment: Patch | ||
| regex: ^(?:hot)?fix/? | ||
| is-main-branch: false | ||
| source-branches: | ||
| - main | ||
| ignore: | ||
| sha: [] | ||
| merge-message-formats: {} |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.