-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from creyD/dev
- Loading branch information
Showing
4 changed files
with
47 additions
and
18 deletions.
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 |
---|---|---|
|
@@ -6,7 +6,6 @@ on: | |
- master | ||
- dev | ||
paths-ignore: | ||
- "**/.github/**" | ||
- "**/.gitignore" | ||
- "**/.vscode/**" | ||
- "**/README.md" | ||
|
@@ -46,8 +45,8 @@ jobs: | |
- run: python test.py | ||
|
||
tag_and_publish: | ||
if: github.ref == 'refs/heads/master' | ||
runs-on: ubuntu-latest | ||
if: github.head_ref == 'master' || github.head_ref == 'dev' | ||
needs: test | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
|
@@ -57,26 +56,38 @@ jobs: | |
- uses: actions/checkout@v4 | ||
with: | ||
fetch-tags: true | ||
ref: ${{ github.ref }} | ||
ref: ${{ github.head_ref }} | ||
fetch-depth: 0 | ||
|
||
- name: setup git | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "creyD" | ||
- name: set version format | ||
id: version_format | ||
run: | | ||
if [[ ${{ github.head_ref }} == 'master' ]]; then | ||
echo "version_format=\${major}.\${minor}.\${patch}" >> $GITHUB_OUTPUT | ||
else | ||
echo "version_format=\${major}.\${minor}.\${patch}rc\${increment}" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Git Version | ||
uses: codacy/git-version@2.8.0 | ||
uses: PaulHatch/semantic-version@v5.4.0 | ||
id: git_version | ||
with: | ||
minor-identifier: "feat:" | ||
major-identifier: "breaking:" | ||
tag_prefix: "" | ||
major_pattern: "breaking:" | ||
minor_pattern: "feat:" | ||
enable_prerelease_mode: false | ||
version_format: ${{ steps.version_format.outputs.version_format }} | ||
|
||
- name: Create Tag | ||
run: git tag ${{ steps.git_version.outputs.version }} | ||
|
||
- name: Push tag | ||
run: git push origin ${{ steps.git_version.outputs.version }} | ||
- name: Create & Push Tag | ||
if: github.head_ref == 'master' || github.head_ref == 'dev' | ||
run: | | ||
git tag ${{ steps.git_version.outputs.version }} | ||
git push origin ${{ steps.git_version.outputs.version }} | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
|
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
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