File tree Expand file tree Collapse file tree 2 files changed +17
-10
lines changed Expand file tree Collapse file tree 2 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -47,23 +47,18 @@ jobs:
47
47
run : ./dev/before
48
48
- name : Build
49
49
run : ./mvnw -DskipTests=true -Dmaven.javadoc.skip=false -B -V package
50
- - name : Create Release
51
- id : create_release
52
- uses : actions/create-release@v1
50
+ - name : Get upload URL
51
+ id : get_upload_url
53
52
env :
54
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
55
- with :
56
- tag_name : ${{ github.ref }}
57
- release_name : ${{ github.ref }}
58
- draft : false
59
- prerelease : false
53
+ OPENGROK_TAG : ${{ needs.get_tag.outputs.tag }}
54
+ run : dev/get_upload_url.sh
60
55
- name : Upload release tarball
61
56
id : upload-release-asset
62
57
uses : actions/upload-release-asset@v1
63
58
env :
64
59
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
65
60
with :
66
- upload_url : ${{ steps.create_release .outputs.upload_url }}
61
+ upload_url : ${{ steps.get_upload_url .outputs.upload_url }}
67
62
asset_path : ./distribution/target/opengrok-${{ needs.get_tag.outputs.tag }}.tar.gz
68
63
asset_name : opengrok-${{ needs.get_tag.outputs.tag }}.tar.gz
69
64
asset_content_type : application/octet-stream
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ #
3
+ # The purpose of this script is to retrieve upload URL for OpenGrok release given by the tag
4
+ # stored in the OPENGROK_TAG environment variable.
5
+ # The value is stored in a special file consumed by Github action so that it can be used
6
+ # to upload assets to the related OpenGrok release on Github.
7
+ #
8
+
9
+ echo " Getting upload URL for $OPENGROK_TAG "
10
+ upload_url=$( curl -s https://github.com/api/repos/oracle/opengrok/releases/$OPENGROK_TAG | jq -r .upload_url )
11
+ echo " Got $upload_url "
12
+ echo " upload_url=$upload_url " >> $GITHUB_OUTPUT "
You can’t perform that action at this time.
0 commit comments