Skip to content
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

Reapply "Use ${{github.token}} as default" #201

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github: [mathieudutour]
github: [kzrnm]
17 changes: 17 additions & 0 deletions .github/workflows/test-repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "Test current repository"
on:
workflow_dispatch:
inputs:
custom_tag:
description: custom_tag argument
required: false
type: string

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
with:
custom_tag: "${{inputs.custom_tag}}"
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: npm ci
- run: npm run test
- run: npm run check
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/update-major-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Update Major Version

on:
release:
types: [published, edited]

jobs:
update-majorver:
name: Update Major Version
runs-on: ubuntu-latest
steps:
- uses: Actions-R-Us/actions-tagger@v2
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
/.vscode/
/lib/
/docs/
/dist/
/*.json
/*.js
/*.yml
/*.md
/*.md
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

A GitHub Action to automatically bump and tag master, on merge, with the latest SemVer formatted version. Works on any platform.

This is a fork repository of [mathieudutour/github-tag-action](https://github.com/mathieudutour/github-tag-action).

## Usage

```yaml
Expand All @@ -14,12 +16,10 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
uses: kzrnm/github-tag-action@v1
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
Expand All @@ -30,7 +30,7 @@ jobs:

### 📥 Inputs

- **github_token** _(required)_ - Required for permission to tag the repo. Usually `${{ secrets.GITHUB_TOKEN }}`.
- **github_token** _(optional)_ - GitHub token for permission to tag the repo (default: `${{github.token}}`).
- **commit_sha** _(optional)_ - 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.

#### Fetch all tags
Expand Down
11 changes: 6 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ outputs:
description: "The conventional changelog since the previous tag"
inputs:
github_token:
description: "Required for permission to tag the repo."
required: true
description: "GitHub token for permission to tag the repo."
required: false
default: ${{ github.token }}
default_bump:
description: "Which type of bump to use when none explicitly provided when commiting to a release branch (default: `patch`)."
required: false
Expand Down Expand Up @@ -61,8 +62,8 @@ inputs:
default: "false"

runs:
using: "node16"
main: "lib/main.js"
using: "node20"
main: "dist/main.js"
branding:
icon: "git-merge"
color: "purple"
color: "yellow"
56 changes: 56 additions & 0 deletions dist/commit.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
* {{header}}

{{~!-- commit link --}} {{#if @root.linkReferences~}}
([{{hash}}](
{{~#if @root.repository}}
{{~#if @root.host}}
{{[email protected]}}/
{{~/if}}
{{~#if @root.owner}}
{{[email protected]}}/
{{~/if}}
{{[email protected]}}
{{~else}}
{{[email protected]}}
{{~/if}}/
{{[email protected]}}/{{hash}}))
{{~else}}
{{~hash}}
{{~/if}}

{{~!-- commit references --}}
{{~#if references~}}
, closes
{{~#each references}} {{#if @root.linkReferences~}}
[
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}#{{this.issue}}](
{{~#if @root.repository}}
{{~#if @root.host}}
{{[email protected]}}/
{{~/if}}
{{~#if this.repository}}
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}
{{~else}}
{{~#if @root.owner}}
{{[email protected]}}/
{{~/if}}
{{[email protected]}}
{{~/if}}
{{~else}}
{{[email protected]}}
{{~/if}}/
{{[email protected]}}/{{this.issue}})
{{~else}}
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}#{{this.issue}}
{{~/if}}{{/each}}
{{~/if}}

61 changes: 61 additions & 0 deletions dist/commit1.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
*{{#if scope}} **{{scope}}:**
{{~/if}} {{#if subject}}
{{~subject}}
{{~else}}
{{~header}}
{{~/if}}

{{~!-- commit link --}} {{#if @root.linkReferences~}}
([{{shortHash}}](
{{~#if @root.repository}}
{{~#if @root.host}}
{{[email protected]}}/
{{~/if}}
{{~#if @root.owner}}
{{[email protected]}}/
{{~/if}}
{{[email protected]}}
{{~else}}
{{[email protected]}}
{{~/if}}/
{{[email protected]}}/{{hash}}))
{{~else}}
{{~shortHash}}
{{~/if}}

{{~!-- commit references --}}
{{~#if references~}}
, closes
{{~#each references}} {{#if @root.linkReferences~}}
[
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}#{{this.issue}}](
{{~#if @root.repository}}
{{~#if @root.host}}
{{[email protected]}}/
{{~/if}}
{{~#if this.repository}}
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}
{{~else}}
{{~#if @root.owner}}
{{[email protected]}}/
{{~/if}}
{{[email protected]}}
{{~/if}}
{{~else}}
{{[email protected]}}
{{~/if}}/
{{[email protected]}}/{{this.issue}})
{{~else}}
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}#{{this.issue}}
{{~/if}}{{/each}}
{{~/if}}

10 changes: 10 additions & 0 deletions dist/footer.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{#if noteGroups}}
{{#each noteGroups}}

### {{title}}

{{#each notes}}
* {{text}}
{{/each}}
{{/each}}
{{/if}}
11 changes: 11 additions & 0 deletions dist/footer1.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{#if noteGroups}}
{{#each noteGroups}}

### {{title}}

{{#each notes}}
* {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}}
{{/each}}
{{/each}}

{{/if}}
9 changes: 9 additions & 0 deletions dist/header.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## {{#if isPatch~}} <small>
{{~/if~}} {{version}}
{{~#if title}} "{{title}}"
{{~/if~}}
{{~#if date}} ({{date}})
{{~/if~}}
{{~#if isPatch~}} </small>
{{~/if}}

25 changes: 25 additions & 0 deletions dist/header1.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{#if isPatch~}}
##
{{~else~}}
#
{{~/if}} {{#if @root.linkCompare~}}
[{{version}}](
{{~#if @root.repository~}}
{{~#if @root.host}}
{{[email protected]}}/
{{~/if}}
{{~#if @root.owner}}
{{[email protected]}}/
{{~/if}}
{{[email protected]}}
{{~else}}
{{[email protected]}}
{{~/if~}}
/compare/{{previousTag}}...{{currentTag}})
{{~else}}
{{~version}}
{{~/if}}
{{~#if title}} "{{title}}"
{{~/if}}
{{~#if date}} ({{date}})
{{/if}}
61 changes: 61 additions & 0 deletions dist/index.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/index.js.map

Large diffs are not rendered by default.

Loading