Skip to content

Commit

Permalink
feat: generate proper git tag
Browse files Browse the repository at this point in the history
  • Loading branch information
rlespinasse authored Oct 2, 2022
1 parent 0141d9b commit 9c3571f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 24 deletions.
40 changes: 19 additions & 21 deletions .github/workflows/v4-tests-and-release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: "[v4] Test and Release"
name: '[v4] Test and Release'
on: [push, pull_request]
jobs:
check-v3compatibility:
name: "Check v3 compatibility"
name: 'Check v3 compatibility'
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
shell: bash

check-v3compatibility-without-checkout:
name: "Check v3 compatibility (without checkout)"
name: 'Check v3 compatibility (without checkout)'
needs:
- check-v3compatibility
strategy:
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
shell: bash

display:
name: "Display produced variables"
name: 'Display produced variables'
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -191,7 +191,7 @@ jobs:
shell: bash

display-without-checkout:
name: "Display produced variables (without checkout)"
name: 'Display produced variables (without checkout)'
needs:
- display
strategy:
Expand Down Expand Up @@ -236,7 +236,7 @@ jobs:
- name: Using correct short length
uses: ./
with:
prefix: "CSL_"
prefix: 'CSL_'
short-length: 4
- name: Using correct length // Validate that all short variables lengths are equals to short-length
run: |
Expand All @@ -248,8 +248,8 @@ jobs:
id: using-wrong-short-length
uses: ./
with:
prefix: "WSL_"
short-length: "wrong"
prefix: 'WSL_'
short-length: 'wrong'
continue-on-error: true
- name: Using wrong short length // Validate that the action end with an error
run: |
Expand Down Expand Up @@ -278,7 +278,7 @@ jobs:
- name: Using correct short length
uses: ./this-action
with:
prefix: "CSL_"
prefix: 'CSL_'
short-length: 4
- name: Using correct length // Validate that all short variables lengths are equals to short-length
run: |
Expand All @@ -290,7 +290,7 @@ jobs:
id: using-empty-short-length
uses: ./this-action
with:
prefix: "ESL_"
prefix: 'ESL_'
continue-on-error: true
- name: Using empty short length // Validate that the action don't end with an error
run: |
Expand All @@ -304,8 +304,8 @@ jobs:
id: using-wrong-short-length
uses: ./this-action
with:
prefix: "WSL_"
short-length: "wrong"
prefix: 'WSL_'
short-length: 'wrong'
continue-on-error: true
- name: Using wrong short length // Validate that the action end with an error
run: |
Expand All @@ -329,7 +329,7 @@ jobs:
- name: Using correct slug max length
uses: ./
with:
prefix: "CML_"
prefix: 'CML_'
slug-maxlength: 1
- name: Using correct max length // Validate that all slug variables lengths are equals or under the slug-maxlength
run: |
Expand All @@ -341,8 +341,8 @@ jobs:
id: using-wrong-slug-max-length
uses: ./
with:
prefix: "WML_"
slug-maxlength: "wrong"
prefix: 'WML_'
slug-maxlength: 'wrong'
continue-on-error: true
- name: Using wrong slug max length // Validate that the action end with an error
run: |
Expand All @@ -356,8 +356,8 @@ jobs:
id: using-empty-slug-max-length
uses: ./
with:
prefix: "EML_"
slug-maxlength: ""
prefix: 'EML_'
slug-maxlength: ''
continue-on-error: true
- name: Using empty slug max length // Validate that the action end with an error
run: |
Expand All @@ -371,8 +371,8 @@ jobs:
id: using-nolimit-slug-max-length
uses: ./
with:
prefix: "NLML_"
slug-maxlength: "nolimit"
prefix: 'NLML_'
slug-maxlength: 'nolimit'
- name: Using no limit on slug max length // Validate that the action end with an error
run: |
[[ "$(env | grep "NLML_" | grep "_SLUG" | wc -l)" -gt 0 ]]
Expand All @@ -394,5 +394,3 @@ jobs:
uses: actions/checkout@v3
- name: Release this GitHub Action
uses: rlespinasse/release-that@v1
with:
without-prefix: true
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,15 +246,13 @@ Please, use the current major tag `v4` or a version tag (see [releases pages][re
- [Github Actions : enfin des pipelines accessibles aux développeurs][talk-1] (in french :fr:)
- The next one is you. _Don't hesitate to add youself to this list._

[actions]: https://github.com/rlespinasse/github-slug-action/actions
[license]: https://github.com/rlespinasse/github-slug-action/blob/v4.x/LICENSE
[examples]: https://github.com/rlespinasse/github-slug-action/tree/v4.x/examples
[custom-variable]: https://github.com/rlespinasse/github-slug-action/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=
[releases]: https://github.com/rlespinasse/github-slug-action/releases
[issue-15]: https://github.com/rlespinasse/github-slug-action/issues/15
[issue-104]: https://github.com/rlespinasse/github-slug-action/issues/104

[git-revpars]: https://git-scm.com/docs/git-rev-parse#Documentation/git-rev-parse.txt---shortlength
[git-revparse]: https://git-scm.com/docs/git-rev-parse#Documentation/git-rev-parse.txt---shortlength
[git-core-abbrev]: https://git-scm.com/docs/git-config#Documentation/git-config.txt-coreabbrev

[default-environment-variables]: https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
Expand Down

0 comments on commit 9c3571f

Please sign in to comment.