feat: automatic draft release updated
This commit is contained in:
parent
b4792451ab
commit
22f647cb2a
3 changed files with 32 additions and 42 deletions
54
.github/workflows/release.yml
vendored
54
.github/workflows/release.yml
vendored
|
|
@ -1,20 +1,15 @@
|
|||
name: Extract executable binary and upload artifacts
|
||||
name: Extract executable binary, upload artifacts, create release
|
||||
on:
|
||||
push:
|
||||
# workflow_run:
|
||||
# workflows:
|
||||
# - "Build and Publish Docker"
|
||||
# - "Unit Test"
|
||||
# types:
|
||||
# - "completed"
|
||||
# branches:
|
||||
# - "main"
|
||||
# - "develop"
|
||||
workflow_run:
|
||||
workflows:
|
||||
- "Build and publish docker"
|
||||
types:
|
||||
- "completed"
|
||||
|
||||
jobs:
|
||||
on-success:
|
||||
runs-on: ubuntu-latest
|
||||
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
|
@ -75,13 +70,12 @@ jobs:
|
|||
|
||||
steps:
|
||||
- run: "echo 'The relese triggering workflows passed'"
|
||||
|
||||
- name: "set env"
|
||||
#if [ ${{ github.ref_name == 'develop' }} ];then BUILD_NAME="rpxy-nightly";else BUILD_NAME="rpxy";fi
|
||||
run: |
|
||||
if [ ${{ matrix.platform }} = "linux/amd64" ];then PLATFORM_MAP="x86_64";else PLATFORM_MAP="aarch64";fi
|
||||
if [ ${{ github.ref_name == 'develop' }} ];then BUILD_NAME="rpxy-nightly";else BUILD_NAME="rpxy";fi
|
||||
echo "PLATFORM_MAP=${PLATFORM_MAP}" >> $GITHUB_ENV
|
||||
echo "TARGET_NAME=rpxy-${PLATFORM_MAP}-unknown-linux-${{ matrix.target }}${{ matrix.build-feature }}" >> $GITHUB_ENV
|
||||
echo "TARGET_NAME=${BUILD_NAME}-${PLATFORM_MAP}-unknown-linux-${{ matrix.target }}${{ matrix.build-feature }}" >> $GITHUB_ENV
|
||||
|
||||
- name: "docker pull and extract binary from docker image"
|
||||
id: "extract-binary"
|
||||
|
|
@ -97,15 +91,15 @@ jobs:
|
|||
name: ${{ steps.extract-binary.outputs.artifact }}
|
||||
path: "/tmp/${{ steps.extract-binary.outputs.artifact }}"
|
||||
|
||||
# on-failure:
|
||||
# runs-on: ubuntu-latest
|
||||
# if: ${{ github.event.workflow_run.conclusion == 'failure' }}
|
||||
# steps:
|
||||
# - run: echo 'The release triggering workflows failed'
|
||||
on-failure:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
|
||||
steps:
|
||||
- run: echo 'The release triggering workflows failed'
|
||||
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
needs: on-success
|
||||
steps:
|
||||
- name: checkout
|
||||
|
|
@ -123,12 +117,12 @@ jobs:
|
|||
for i in ./*; do sh -c "cd $i && tar zcvf $i.tar.gz $i && mv $i.tar.gz /tmp/assets/"; done
|
||||
ls -lha /tmp/assets
|
||||
|
||||
# - name: release
|
||||
# uses: softprops/action-gh-release@v1
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
# with:
|
||||
# files: /tmp/assets/*.tar.gz
|
||||
# tag_name: ${{ github.ref }}
|
||||
# draft: true
|
||||
# prerelease: false
|
||||
# generate_release_notes: true
|
||||
- name: release
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
files: /tmp/assets/*.tar.gz
|
||||
tag_name: ${{ github.ref }}
|
||||
draft: true
|
||||
prerelease: false
|
||||
generate_release_notes: true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue