Add .gitea/workflows/*.yaml
This commit is contained in:
@@ -12,37 +12,20 @@ jobs:
|
|||||||
# Accessing the context for Github
|
# Accessing the context for Github
|
||||||
if: ${{ github.event.pull_request.merged == true }}
|
if: ${{ github.event.pull_request.merged == true }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# On GitHub this grants tag push; on Gitea it's ignored, but harmless.
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout main (not the merge SHA)
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
with:
|
||||||
with:
|
ref: ${{ github.event.pull_request.merge_commit_sha }}
|
||||||
ref: main # create a local 'main'
|
fetch-depth: '0'
|
||||||
fetch-depth: 0
|
|
||||||
token: ${{ secrets.REGISTRY_TOKEN }}
|
|
||||||
|
|
||||||
- name: Ensure local 'main' tracks origin/main (for Gitea runners)
|
- name: Bump version and push tag
|
||||||
run: |
|
id: tag
|
||||||
# make sure we have everything
|
uses: mathieudutour/github-tag-action@v6.2
|
||||||
git fetch origin main --tags --prune
|
with:
|
||||||
# be on main (no-op if already there)
|
github_token: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
git checkout main || git switch main
|
release_branches: main
|
||||||
# hard update the working tree to match origin/main
|
default_bump: minor # major, minor, or patch
|
||||||
git reset --hard origin/main
|
tag_prefix: v
|
||||||
# ensure upstream is set (harmless if already set)
|
|
||||||
git branch --set-upstream-to=origin/main main
|
|
||||||
git config user.name "hangpersonal"
|
|
||||||
git config user.email "hangcui1201@gmail.com"
|
|
||||||
|
|
||||||
- name: Bump version and push tag
|
- name: Show new tag
|
||||||
uses: anothrNick/github-tag-action@1.64.0
|
run: echo "New tag is ${{ steps.tag.outputs.new_tag }}"
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
|
||||||
WITH_V: true
|
|
||||||
DEFAULT_BUMP: minor
|
|
||||||
DEFAULT_BRANCH: main
|
|
||||||
RELEASE_BRANCHES: main
|
|
||||||
TAG_CONTEXT: repo
|
|
||||||
Reference in New Issue
Block a user