diff --git a/.github/actions/adjust-snapshot-buildno/action.yml b/.github/actions/adjust-snapshot-buildno/action.yml new file mode 100644 index 0000000000..fba61ec770 --- /dev/null +++ b/.github/actions/adjust-snapshot-buildno/action.yml @@ -0,0 +1,20 @@ +name: Adjust snapshot build number +description: Adjust snapshot build number + +runs: + using: composite + steps: + - id: adjust-snapshot-buildno + if: + github.repository == 'FirebirdSQL/firebird' && + (github.ref_type == 'branch' && + (github.ref_name == 'master' || + (startsWith(github.ref_name, 'v') && endsWith(github.ref_name, '-release')) + ) + ) || + false + shell: bash + run: | + sed -i'' -e "s/SuffixKind=\(.*\)/SuffixKind=\"$(echo ${{ github.sha }} | cut -c 1-7)\"/" src/misc/writeBuildNum.sh + mkdir gen + src/misc/writeBuildNum.sh rebuildHeader diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c8306dc498..41baf0c534 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,6 +14,9 @@ jobs: with: fetch-depth: 10 + - name: Adjust snapshot build number + uses: ./.github/actions/adjust-snapshot-buildno + - name: Prepare run: | sudo apt-get install libtool-bin libtomcrypt1 libtomcrypt-dev libtommath1 libtommath-dev libicu-dev zlib1g-dev cmake @@ -55,6 +58,9 @@ jobs: with: fetch-depth: 10 + - name: Adjust snapshot build number + uses: ./.github/actions/adjust-snapshot-buildno + - name: Get Release Notes uses: ./.github/actions/get-release-notes @@ -96,6 +102,9 @@ jobs: with: fetch-depth: 10 + - name: Adjust snapshot build number + uses: ./.github/actions/adjust-snapshot-buildno + - name: Get Release Notes uses: ./.github/actions/get-release-notes @@ -123,7 +132,10 @@ jobs: fetch-depth: 10 - name: Prepare - run: apk update && apk --no-cache --update add build-base libtool git autoconf automake cmake zlib-dev icu-dev ncurses-dev libedit-dev linux-headers tar + run: apk update && apk --no-cache --update add build-base libtool git autoconf automake cmake zlib-dev icu-dev ncurses-dev libedit-dev linux-headers tar sed + + - name: Adjust snapshot build number + uses: ./.github/actions/adjust-snapshot-buildno - name: Build run: | @@ -160,6 +172,9 @@ jobs: with: fetch-depth: 10 + - name: Adjust snapshot build number + uses: ./.github/actions/adjust-snapshot-buildno + - name: Prepare shell: cmd run: | @@ -210,6 +225,9 @@ jobs: with: fetch-depth: 10 + - name: Adjust snapshot build number + uses: ./.github/actions/adjust-snapshot-buildno + - name: Get Release Notes uses: ./.github/actions/get-release-notes @@ -287,6 +305,9 @@ jobs: fetch-depth: 10 submodules: 'true' + - name: Adjust snapshot build number + uses: ./.github/actions/adjust-snapshot-buildno + - name: Prepare - Install tools run: | brew install automake autoconf-archive cmake libtool ninja @@ -370,6 +391,9 @@ jobs: with: fetch-depth: 10 + - name: Adjust snapshot build number + uses: ./.github/actions/adjust-snapshot-buildno + - name: Prepare - install Linux tools run: | sudo apt-get install libtool-bin libtomcrypt1 libtomcrypt-dev libtommath1 libtommath-dev libicu-dev zlib1g-dev @@ -419,6 +443,9 @@ jobs: with: fetch-depth: 10 + - name: Adjust snapshot build number + uses: ./.github/actions/adjust-snapshot-buildno + - name: Enable KVM run: | echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules