11name : Publish Release
22
33on :
4- workflow_call :
5- inputs :
6- ref :
7- description : ' Git ref to build and publish'
8- required : true
9- type : string
10- is_release :
11- description : ' Whether this is a release build (affects artifact publishing)'
12- required : false
13- type : boolean
14- default : false
4+ push :
5+ tags :
6+ - v*
7+ branches :
8+ - main
159
1610permissions :
1711 contents : read
3327 - name : Checkout code 🛎️
3428 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3529 with :
36- ref : ${{ inputs.ref }}
3730 fetch-depth : 0
3831 persist-credentials : false
3932
4538
4639 - name : Publish container 🚀
4740 run : ./tools/ci/docker-containers ${{ matrix.container }}
41+ env :
42+ DRONE_TAG : ${{ github.ref_name }}
4843
4944 publish-windows-containers :
5045 name : Publish Windows container (${{ matrix.container }})
@@ -62,20 +57,21 @@ jobs:
6257 - name : Checkout code 🛎️
6358 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6459 with :
65- ref : ${{ inputs.ref }}
6660 fetch-depth : 0
6761 persist-credentials : false
6862
6963 - name : Build containers 🏗️
7064 run : |
7165 & "C:/Program Files/git/bin/bash.exe" ./tools/ci/docker-containers-windows ${{ matrix.container }}
7266 shell : powershell
67+ env :
68+ DRONE_TAG : ${{ github.ref_name }}
7369
7470 publish-release :
7571 name : Publish release
76- runs-on : ubuntu-latest
72+ runs-on : ubuntu-latest-8-cores
7773 needs : [publish-linux-containers, publish-windows-containers]
78- if : ${{ inputs.is_release }}
74+ if : startsWith(github.ref, 'refs/tags/v')
7975 permissions :
8076 contents : write
8177 id-token : write
8682 - name : Checkout code 🛎️
8783 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
8884 with :
89- ref : ${{ inputs.ref }}
9085 fetch-depth : 0
9186 persist-credentials : false
9287
@@ -103,13 +98,11 @@ jobs:
10398 cache : false
10499
105100 - name : Build release artifacts 📦
106- run : make -j4 RELEASE_BUILD=1 VERSION=${GITHUB_REF_NAME} dist
107- env :
108- GITHUB_REF_NAME : ${{ inputs.ref }}
101+ run : make -k -j4 RELEASE_BUILD=1 VERSION=${GITHUB_REF_NAME} dist
109102
110103 - name : Publish release 🚀
111104 run : |
112105 VERSION=${GITHUB_REF_NAME} RELEASE_DOC_TAG=$(echo ${GITHUB_REF_NAME} | awk -F '.' '{print $1"."$2}') ./tools/release
113106 env :
114107 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
115- GITHUB_REF_NAME : ${{ inputs.ref }}
108+ GITHUB_REF_NAME : ${{ github.ref_name }}
0 commit comments