-
Notifications
You must be signed in to change notification settings - Fork 5
66 lines (58 loc) · 2.05 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Write release and finish
on:
push:
tags:
- v*
jobs:
finish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.TOOLS_BOT_PAK }}
- name: Build release asset names
id: release_assets
run: |
echo ::set-output name=version_tag::${GITHUB_REF#refs/tags/}
echo ::set-output name=ARC_FILE::ASF_ArcGIS_Toolbox_$(echo ${GITHUB_REF#refs/tags/}).zip
- name: Zip ArcGIS Toolbox
uses: montudor/action-zip@v1
with:
args: zip -qq -j -r ${{ steps.release_assets.outputs.ARC_FILE }} ArcGIS-toolbox
- name: Create Release
uses: docker://antonyurchenko/git-release:v3.5.0
env:
GITHUB_TOKEN: ${{ secrets.TOOLS_BOT_PAK }}
ALLOW_TAG_PREFIX: "true"
RELEASE_NAME_PREFIX: "ASF Tools "
with:
args: |
${{ steps.release_assets.outputs.ARC_FILE }}
- name: Bump ASF Tools version in HyP3 docs
uses: benc-uk/[email protected]
with:
workflow: update_asf_tools_version.yml
token: ${{ secrets.TOOLS_BOT_PAK }}
repo: ASFHyP3/hyp3-docs
ref: main
inputs: '{"asf_tools_version": "${{ steps.release_assets.outputs.version_tag }}"}'
- name: Attempt fast-forward develop from main
run: |
git fetch --prune
git checkout develop && git pull --ff-only
git merge --ff-only origin/main
git push
- name: On failure, open PR to bring release back to develop
if: ${{ failure() }}
env:
PR_TITLE: Pulling ${{ github.ref }} into develop
PR_BODY: Fast-forward of main to develop failed!
GH_TOKEN: ${{ secrets.USER_TOKEN }}
run: |
gh pr create --title "${PR_TITLE}" \
--body "${PR_BODY}" \
--assignee ${{ github.actor }} \
--label tools-bot \
--head main \
--base develop