Skip to content

Commit 926ed93

Browse files
committed
remove release creation step
1 parent 3c58f6a commit 926ed93

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,23 +47,18 @@ jobs:
4747
run: ./dev/before
4848
- name: Build
4949
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
5352
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
6055
- name: Upload release tarball
6156
id: upload-release-asset
6257
uses: actions/upload-release-asset@v1
6358
env:
6459
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6560
with:
66-
upload_url: ${{ steps.create_release.outputs.upload_url }}
61+
upload_url: ${{ steps.get_upload_url.outputs.upload_url }}
6762
asset_path: ./distribution/target/opengrok-${{ needs.get_tag.outputs.tag }}.tar.gz
6863
asset_name: opengrok-${{ needs.get_tag.outputs.tag }}.tar.gz
6964
asset_content_type: application/octet-stream

dev/get_upload_url.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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"

0 commit comments

Comments
 (0)