forked from mathieudutour/github-tag-action
-
Notifications
You must be signed in to change notification settings - Fork 0
NP-790: Upgrade action to Node 24 LTS and modernize TypeScript toolchain #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
Merged
Merged
Changes from all commits
Commits
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
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
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,16 @@ | ||
| # Pin this repository to the public npm registry regardless of what the | ||
| # current user's `~/.npmrc` points at. This matters because: | ||
| # | ||
| # * This project is an open-source GitHub Action; external contributors | ||
| # (and GitHub-hosted runners) must be able to `npm install` without | ||
| # access to any private mirror. | ||
| # * `package-lock.json` records one `resolved` URL per package. If any | ||
| # contributor has a private mirror configured as their default | ||
| # registry and regenerates the lockfile, those private URLs get | ||
| # committed and break CI everywhere that cannot reach that mirror | ||
| # (e.g. `getaddrinfo ENOTFOUND artifactory.<org>.dev` on | ||
| # `ubuntu-latest`). | ||
| # | ||
| # Keep this file at the repo root; `npm` reads it in addition to `~/.npmrc` | ||
| # and the project-level setting wins for `registry`. | ||
| registry=https://registry.npmjs.org/ |
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 @@ | ||
| 24 |
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 |
|---|---|---|
| @@ -1,8 +1,10 @@ | ||
| /.github/ | ||
| /.vscode/ | ||
| /lib/ | ||
| /docs/ | ||
| /*.json | ||
| /*.js | ||
| /*.yml | ||
| /*.md | ||
| .github/ | ||
| .vscode/ | ||
| lib/ | ||
| node_modules/ | ||
| docs/ | ||
| *.md | ||
| LICENSE | ||
| .nvmrc | ||
| .prettierignore | ||
| package-lock.json |
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 |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| { | ||
| "singleQuote": true, | ||
| "parser": "typescript" | ||
| "trailingComma": "es5" | ||
| } |
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
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 |
|---|---|---|
| @@ -1,68 +1,68 @@ | ||
| name: "GitHub Tag" | ||
| description: "Bump and push git tag on merge" | ||
| author: "Mathieu Dutour" | ||
| name: 'GitHub Tag' | ||
| description: 'Bump and push git tag on merge' | ||
| author: 'Mathieu Dutour' | ||
| outputs: | ||
| new_tag: | ||
| description: "Generated tag" | ||
| description: 'Generated tag' | ||
| new_version: | ||
| description: "Generated tag without the prefix" | ||
| description: 'Generated tag without the prefix' | ||
| previous_tag: | ||
| description: "Previous tag (or `0.0.0`)" | ||
| description: 'Previous tag (or `0.0.0`)' | ||
| release_type: | ||
| description: "The computed release type (`major`, `minor`, `patch` or `custom` - can be prefixed with `pre`)" | ||
| description: 'The computed release type (`major`, `minor`, `patch` or `custom` - can be prefixed with `pre`)' | ||
| changelog: | ||
| description: "The conventional changelog since the previous tag" | ||
| description: 'The conventional changelog since the previous tag' | ||
| inputs: | ||
| github_token: | ||
| description: "Required for permission to tag the repo." | ||
| description: 'Required for permission to tag the repo.' | ||
| required: true | ||
| default_bump: | ||
| description: "Which type of bump to use when none explicitly provided when commiting to a release branch (default: `patch`)." | ||
| description: 'Which type of bump to use when none explicitly provided when commiting to a release branch (default: `patch`).' | ||
| required: false | ||
| default: "patch" | ||
| default: 'patch' | ||
| default_prerelease_bump: | ||
| description: "Which type of bump to use when none explicitly provided when commiting to a prerelease branch (default: `prerelease`)." | ||
| description: 'Which type of bump to use when none explicitly provided when commiting to a prerelease branch (default: `prerelease`).' | ||
| required: false | ||
| default: "prerelease" | ||
| default: 'prerelease' | ||
| tag_prefix: | ||
| description: "A prefix to the tag name (default: `v`)." | ||
| description: 'A prefix to the tag name (default: `v`).' | ||
| required: false | ||
| default: "v" | ||
| default: 'v' | ||
| append_to_pre_release_tag: | ||
| description: "A suffix to a pre-release tag name (default: `<branch>`)." | ||
| description: 'A suffix to a pre-release tag name (default: `<branch>`).' | ||
| required: false | ||
| custom_tag: | ||
| description: "Custom tag name. If specified, it overrides bump settings." | ||
| description: 'Custom tag name. If specified, it overrides bump settings.' | ||
| required: false | ||
| custom_release_rules: | ||
| description: "Comma separated list of release rules. Format: `<keyword>:<release_type>`. Example: `hotfix:patch,pre-feat:preminor`." | ||
| description: 'Comma separated list of release rules. Format: `<keyword>:<release_type>`. Example: `hotfix:patch,pre-feat:preminor`.' | ||
| required: false | ||
| release_branches: | ||
| description: "Comma separated list of branches (bash reg exp accepted) that will generate the release tags. Other branches and pull-requests generate versions postfixed with the commit hash and do not generate any tag. Examples: `master` or `.*` or `release.*,hotfix.*,master`..." | ||
| description: 'Comma separated list of branches (bash reg exp accepted) that will generate the release tags. Other branches and pull-requests generate versions postfixed with the commit hash and do not generate any tag. Examples: `master` or `.*` or `release.*,hotfix.*,master`...' | ||
| required: false | ||
| default: "master,main" | ||
| default: 'master,main' | ||
| pre_release_branches: | ||
| description: "Comma separated list of branches (bash reg exp accepted) that will generate pre-release tags." | ||
| description: 'Comma separated list of branches (bash reg exp accepted) that will generate pre-release tags.' | ||
| required: false | ||
| commit_sha: | ||
| description: "The commit SHA value to add the tag. If specified, it uses this value instead GITHUB_SHA. It could be useful when a previous step merged a branch into github.ref." | ||
| description: 'The commit SHA value to add the tag. If specified, it uses this value instead GITHUB_SHA. It could be useful when a previous step merged a branch into github.ref.' | ||
| required: false | ||
| create_annotated_tag: | ||
| description: "Boolean to create an annotated tag rather than lightweight." | ||
| description: 'Boolean to create an annotated tag rather than lightweight.' | ||
| required: false | ||
| default: "false" | ||
| default: 'false' | ||
| fetch_all_tags: | ||
| description: "Boolean to fetch all tags for a repo (if false, only the last 100 will be fetched)." | ||
| description: 'Boolean to fetch all tags for a repo (if false, only the last 100 will be fetched).' | ||
| required: false | ||
| default: "false" | ||
| default: 'false' | ||
| dry_run: | ||
| description: "Do not perform tagging, just calculate next version and changelog, then exit." | ||
| description: 'Do not perform tagging, just calculate next version and changelog, then exit.' | ||
| required: false | ||
| default: "false" | ||
| default: 'false' | ||
|
|
||
| runs: | ||
| using: "node16" | ||
| main: "lib/main.js" | ||
| using: 'node24' | ||
| main: 'lib/main.js' | ||
| branding: | ||
| icon: "git-merge" | ||
| color: "purple" | ||
| icon: 'git-merge' | ||
| color: 'purple' | ||
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,81 @@ | ||
| // @ts-check | ||
| import js from '@eslint/js'; | ||
| import tseslint from 'typescript-eslint'; | ||
| import globals from 'globals'; | ||
|
|
||
| export default tseslint.config( | ||
| { | ||
| ignores: ['lib/**', 'node_modules/**', 'coverage/**', '*.config.js'], | ||
| }, | ||
| js.configs.recommended, | ||
| ...tseslint.configs.strictTypeChecked, | ||
| ...tseslint.configs.stylisticTypeChecked, | ||
| { | ||
| languageOptions: { | ||
| parserOptions: { | ||
| project: './tsconfig.eslint.json', | ||
| tsconfigRootDir: import.meta.dirname, | ||
| }, | ||
| globals: { | ||
| ...globals.node, | ||
| }, | ||
| }, | ||
| rules: { | ||
| '@typescript-eslint/no-unused-vars': [ | ||
| 'error', | ||
| { | ||
| argsIgnorePattern: '^_', | ||
| varsIgnorePattern: '^_', | ||
| caughtErrorsIgnorePattern: '^_', | ||
| }, | ||
| ], | ||
| '@typescript-eslint/consistent-type-imports': [ | ||
| 'error', | ||
| { prefer: 'type-imports', fixStyle: 'inline-type-imports' }, | ||
| ], | ||
| '@typescript-eslint/no-non-null-assertion': 'error', | ||
| '@typescript-eslint/restrict-template-expressions': [ | ||
| 'error', | ||
| { | ||
| allowNumber: true, | ||
| allowBoolean: true, | ||
| allowNullish: true, | ||
| }, | ||
| ], | ||
| 'no-console': ['warn', { allow: ['info', 'warn', 'error'] }], | ||
| eqeqeq: ['error', 'always', { null: 'ignore' }], | ||
| }, | ||
| }, | ||
| { | ||
| files: ['tests/**/*.ts'], | ||
| rules: { | ||
| '@typescript-eslint/no-unsafe-assignment': 'off', | ||
| '@typescript-eslint/no-unsafe-member-access': 'off', | ||
| '@typescript-eslint/no-unsafe-call': 'off', | ||
| '@typescript-eslint/no-unsafe-argument': 'off', | ||
| '@typescript-eslint/no-unsafe-return': 'off', | ||
| '@typescript-eslint/no-explicit-any': 'off', | ||
| '@typescript-eslint/unbound-method': 'off', | ||
| '@typescript-eslint/require-await': 'off', | ||
| '@typescript-eslint/no-empty-function': 'off', | ||
| // Keep `no-unused-vars` active in tests too so dead assertions and | ||
| // typos are still caught; use the same `^_` escape hatch as production | ||
| // for intentionally-unused params (e.g. indices in fixture builders). | ||
| '@typescript-eslint/no-unused-vars': [ | ||
| 'error', | ||
| { | ||
| argsIgnorePattern: '^_', | ||
| varsIgnorePattern: '^_', | ||
| caughtErrorsIgnorePattern: '^_', | ||
| }, | ||
| ], | ||
| '@typescript-eslint/dot-notation': 'off', | ||
| '@typescript-eslint/consistent-indexed-object-style': 'off', | ||
| '@typescript-eslint/no-confusing-void-expression': 'off', | ||
| }, | ||
| }, | ||
| { | ||
| files: ['**/*.js', '**/*.mjs', '**/*.cjs'], | ||
| ...tseslint.configs.disableTypeChecked, | ||
| } | ||
| ); |
This file was deleted.
Oops, something went wrong.
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.
Typo in input descriptions: "commiting" should be "committing" (appears in both the release-branch and prerelease-branch descriptions).