You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* cda6090 (HEAD -> master, tag: v4.4.0) chore: bump version 4.4.0
* 5c4af3a ci(version): tag on push on master and on PR merge
* bedae60 chore(lint): re-format
Actual
The tag is placed on the previous commit
* cda6090 (HEAD -> master) chore: bump version 4.4.0
* 5c4af3a (tag: v4.4.0) ci(version): tag on push on master and on PR merge
* bedae60 chore(lint): re-format
Workflow
name: Add New Tag After Mergeon:
workflow_call: # allow this workflow to be called from other workflowsjobs:
bump-version:
# if: github.event_name == 'push' || github.event.pull_request.merged == trueruns-on: ubuntu-lateststeps:
- name: Clone repositoryuses: actions/checkout@v3with:
fetch-depth: 0
- name: Get next versionid: next_versionuses: thenativeweb/get-next-version@main
- name: Show the next versionrun: | echo ${{ steps.next_version.outputs.version }} echo ${{ steps.next_version.outputs.hasNextVersion }}
- name: Bump version fileif: steps.next_version.outputs.hasNextVersion == 'true'run: | perl -i -p -e \ "s/(pure_version)\s(\d+(\.)?){3}/\1 ${{ steps.next_version.outputs.version }}/" \ ./conf.d/pure.fish
- name: Set git user metadataif: steps.next_version.outputs.hasNextVersion == 'true'run: | git config user.name github-actions git config user.email [email protected]
- name: Commit new version fileif: steps.next_version.outputs.hasNextVersion == 'true'run: | git add --verbose ./conf.d/pure.fish \ && git commit --allow-empty --message "chore: bump version ${{ steps.next_version.outputs.version }}" \ && git pushadd-version-tag:
# if: github.event_name == 'push' || github.event.pull_request.merged == trueneeds: [bump-version]runs-on: ubuntu-lateststeps:
- name: Clone repositoryuses: actions/checkout@v3with:
ref: "master"
- uses: butlerlogic/action-autotag@stablewith:
root: "./conf.d/pure.fish"regex_pattern: "pure_version\\s(?<version>(\\d+(\\.)?){3})"tag_prefix: "v"env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
Question
How can I tag the latest commit?
The text was updated successfully, but these errors were encountered:
Goal
Working on pure-fish I aim to have a workflow that does:
master
master
and use autotagExpectation
Actual
The tag is placed on the previous commit
Workflow
Question
How can I tag the latest commit?
The text was updated successfully, but these errors were encountered: