-
Notifications
You must be signed in to change notification settings - Fork 2
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
Set up semantic release #14
Closed
Closed
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
a07ebe6
Set up semantic release
andrii-balitskyi f875633
Update release workflow
andrii-balitskyi 39857a3
Add new line
andrii-balitskyi baf522c
Merge branch 'main' of github.com:seamapi/seam-cli into semantic-release
andrii-balitskyi 2504603
Add homepage, bugs and update repository field in package.json
andrii-balitskyi 7b273fc
Add version.yml and action/setup.yml
andrii-balitskyi 3a3ce01
Merge branch 'main' of github.com:seamapi/seam-cli into semantic-release
andrii-balitskyi a21f45d
Merge branch 'main' of github.com:seamapi/seam-cli into semantic-release
andrii-balitskyi 9822fe7
Default package registry url to npm's one in the setup action
andrii-balitskyi 939133b
Update the registry url in validate workflow
andrii-balitskyi 48c719b
Merge branch 'main' of github.com:seamapi/seam-cli into semantic-release
andrii-balitskyi 8f98ae0
Checkout main package-lock
andrii-balitskyi 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 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,52 @@ | ||
--- | ||
name: Setup | ||
description: Setup Node.js and install dependencies. | ||
|
||
inputs: | ||
node_auth_token: | ||
description: The Node.js auth token. | ||
required: true | ||
node_version: | ||
description: The Node.js version. | ||
required: false | ||
default: "20" | ||
registry_url: | ||
description: The Node.js package registry URL. | ||
required: false | ||
default: https://registry.npmjs.org | ||
install_dependencies: | ||
description: Install dependencies. | ||
required: false | ||
default: "true" | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
if: inputs.install_dependencies == 'true' | ||
with: | ||
cache: npm | ||
node-version: ${{ inputs.node_version }} | ||
registry-url: ${{ inputs.registry_url }} | ||
- name: Setup Node.js without cache | ||
uses: actions/setup-node@v4 | ||
if: inputs.install_dependencies == 'false' | ||
with: | ||
node-version: ${{ inputs.node_version }} | ||
registry-url: ${{ inputs.registry_url }} | ||
- name: Install dependencies | ||
if: inputs.install_dependencies == 'true' | ||
shell: bash | ||
run: npm ci --ignore-scripts | ||
env: | ||
NODE_AUTH_TOKEN: ${{ inputs.node_auth_token }} | ||
- name: Rebuild Node.js modules | ||
shell: bash | ||
run: npm rebuild | ||
- name: Run postinstall script | ||
shell: bash | ||
run: npm run postinstall --if-present | ||
- name: Run prepare script | ||
shell: bash | ||
run: npm run prepare --if-present |
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,49 @@ | ||
--- | ||
name: Semantic Release | ||
|
||
run-name: Semantic Release from ${{ github.ref_name }} | ||
|
||
on: | ||
push: | ||
branches: | ||
- "**" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref_name }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
semantic: | ||
name: Determine version | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
outputs: | ||
new_release_published: ${{ steps.release.outputs.new_release_published }} | ||
new_release_version: ${{ steps.release.outputs.new_release_version }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Semantic release | ||
id: release | ||
uses: cycjimmy/semantic-release-action@v4 | ||
with: | ||
dry_run: true | ||
release: | ||
name: Release version | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
needs: semantic | ||
if: ${{ needs.semantic.outputs.new_release_published == 'true' }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
- name: Release version ${{ steps.release.outputs.new_release_version }} on ${{ github.ref_name }} | ||
run: gh workflow run version.yml --raw-field version=$VERSION --ref $BRANCH | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
VERSION: ${{ needs.semantic.outputs.new_release_version }} | ||
BRANCH: ${{ github.ref_name }} |
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,37 @@ | ||
--- | ||
name: Version | ||
|
||
run-name: Cut ${{ github.event.inputs.version }} | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: Version to cut | ||
required: true | ||
|
||
jobs: | ||
tag: | ||
name: Tag | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GH_TOKEN }} | ||
- name: Import GPG key | ||
uses: crazy-max/ghaction-import-gpg@v6 | ||
with: | ||
git_user_signingkey: true | ||
git_commit_gpgsign: true | ||
git_committer_name: ${{ secrets.GIT_USER_NAME }} | ||
git_committer_email: ${{ secrets.GIT_USER_EMAIL }} | ||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
passphrase: ${{ secrets.GPG_PASSPHRASE }} | ||
- name: Setup | ||
uses: ./.github/actions/setup | ||
with: | ||
node_auth_token: ${{ secrets.GH_TOKEN }} | ||
- name: Cut ${{ github.event.inputs.version }} version | ||
run: npm version --sign-git-tag=true ${{ github.event.inputs.version }} |
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,11 @@ | ||
{ | ||
"branches": [ | ||
"+([0-9])?(.{+([0-9]),x}).x", | ||
"main", | ||
"next", | ||
"next-major", | ||
{ "name": "beta", "prerelease": true }, | ||
{ "name": "alpha", "prerelease": true } | ||
], | ||
"plugins": ["@semantic-release/commit-analyzer"] | ||
} |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do these need to be installed in package.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figured that they don't as they are not in the package.json on makenew-tsmodule