forked from lthn/blockchain
Refactor GitHub Actions workflow by removing cleanup-release job and updating tag suffix format
This commit is contained in:
parent
83a0623a49
commit
09cd269ee4
2 changed files with 2 additions and 25 deletions
4
.github/actions/upload-artifacts/action.yml
vendored
4
.github/actions/upload-artifacts/action.yml
vendored
|
|
@ -38,7 +38,7 @@ runs:
|
|||
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
if [ "${{ github.event_name }}" == "pull_request" ]; then
|
||||
TAG_SUFFIX="-${{ github.event.number }}alpha"
|
||||
TAG_SUFFIX="-alpha.${{ github.event.number }}"
|
||||
PRERELEASE=true
|
||||
elif [ "${{ inputs.chain-network }}" != "mainnet" ]; then
|
||||
TAG_SUFFIX="-beta"
|
||||
|
|
@ -86,5 +86,5 @@ runs:
|
|||
with:
|
||||
tag_name: ${{ steps.asset.outputs.tag_name }}
|
||||
prerelease: ${{ steps.asset.outputs.prerelease }}
|
||||
files: ${{ inputs.asset-directory }}/lethean-*
|
||||
files: ${{ inputs.asset-directory }}/*
|
||||
target_commitish: ${{ github.sha }}
|
||||
|
|
|
|||
23
.github/workflows/_on-pr.yml
vendored
23
.github/workflows/_on-pr.yml
vendored
|
|
@ -10,35 +10,12 @@ on:
|
|||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- closed
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
cleanup-release:
|
||||
name: Cleanup Release
|
||||
if: github.event.action == 'closed' && github.event.pull_request.merged == true
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Project
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Get Version
|
||||
id: get_version
|
||||
run: echo "VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Delete Release and Tag
|
||||
if: contains(steps.get_version.outputs.VERSION, '-alpha') || contains(steps.get_version.outputs.VERSION, '-beta')
|
||||
uses: dev-drprasad/delete-older-releases@v0.3.4
|
||||
with:
|
||||
keep_latest: 0
|
||||
delete_tags: true
|
||||
delete_tag_pattern: ${{ steps.get_version.outputs.VERSION }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
build-linux-intel:
|
||||
name: Linux
|
||||
if: ${{!github.event.pull_request.draft}}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue