mirror of
https://github.com/italicsjenga/actions-test.git
synced 2024-12-24 00:51:43 +11:00
47 lines
1.5 KiB
YAML
47 lines
1.5 KiB
YAML
on:
|
|
pull_request:
|
|
types:
|
|
- closed
|
|
jobs:
|
|
release:
|
|
if: github.event.pull_request.merged == true
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
tagname: ${{ steps.describe.outputs.tagname }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: refs/heads/main
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
fetch-tags: true
|
|
# fetch-depth: 0
|
|
# - name: stinky but
|
|
# run: git sparse-checkout disable; git checkout origin/main
|
|
- name: status
|
|
run: git status
|
|
- name: shallow
|
|
run: cat .git/shallow
|
|
- name: deepen tree
|
|
run: git fetch --shallow-since 2023-08-17 --tags --recurse-submodules=no --update-shallow
|
|
# - name: deepen tree
|
|
# run: |
|
|
# depth=0
|
|
# while ! git describe --tags main; do
|
|
# depth=$((depth + 1))
|
|
# git fetch --tags --recurse-submodules=no --depth $depth origin main
|
|
# done
|
|
- name: status
|
|
run: git status
|
|
- name: shallow
|
|
run: cat .git/shallow
|
|
- name: descibe
|
|
run: git describe --tags main
|
|
- name: show refs
|
|
run: find .git/refs
|
|
# - name: peepee poopoo
|
|
# run: git checkout --progress --force -B main refs/remotes/origin/main
|
|
- name: Get git describe for prerelease
|
|
id: describe
|
|
run: echo "tagname=pre-$(git describe --tags main)" >> $GITHUB_OUTPUT
|
|
- name: show describe
|
|
run: echo ${{ steps.describe.outputs.tagname }} |