diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1a6957030b..67802065d2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -105,7 +105,6 @@ jobs: uses: actions/checkout@v3 with: submodules: recursive - - name: Build and test run: | @@ -153,7 +152,6 @@ jobs: uses: actions/checkout@v3 with: submodules: recursive - fetch-tags: true - name: Build and test run: | @@ -317,31 +315,3 @@ jobs: if: failure() run: | scripts/ci_checks/failure.sh - - release-checks: - runs-on: ubuntu-latest - - if: ${{ startsWith(github.ref, 'refs/tags/v') }} - strategy: - fail-fast: false - matrix: - include: - - script: linux-checks/check-version - - name: ${{ matrix.script }} - steps: - - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: recursive - fetch-tags: true - - - name: Build and test - run: | - scripts/ci_checks/${{ matrix.script }}.sh - - - name: Handle failure - if: failure() - run: | - scripts/ci_checks/failure.sh diff --git a/.github/workflows/package.yml b/.github/workflows/release.yml similarity index 63% rename from .github/workflows/package.yml rename to .github/workflows/release.yml index 16505be666..90868d42e5 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: "create packages" +name: "release" on: push: @@ -8,14 +8,40 @@ on: workflow_dispatch: jobs: + checks: + if: ${{ startsWith(github.ref, 'refs/tags/v') }} + + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + include: + - script: linux-checks/check-version + + name: ${{ matrix.script }} + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: recursive + fetch-depth: 0 + + - name: Run check + run: | + scripts/ci_checks/${{ matrix.script }}.sh + package: if: startsWith(github.ref, 'refs/tags/v') + needs: [checks] runs-on: ubuntu-latest + steps: - name: Checkout uses: actions/checkout@v3 with: + submodules: recursive fetch-depth: 0 - name: Version diff --git a/scripts/ci_checks/linux-checks/check-version.sh b/scripts/ci_checks/linux-checks/check-version.sh index 64ff6d327c..7588a2a7f0 100755 --- a/scripts/ci_checks/linux-checks/check-version.sh +++ b/scripts/ci_checks/linux-checks/check-version.sh @@ -2,13 +2,12 @@ set -euo pipefail - tagname="$(git tag -l | tail -n1)" header_tagname="v$(python3 scripts/scons_helpers/parse-version.py)" if [[ "$tagname" != "$header_tagname" ]]; then - echo >&2 + echo >&2 echo >&2"version check FAILED" echo >&2"the git tag name and version declared in version.h is not the same" echo >&2"${tagname} git version tag" @@ -18,5 +17,4 @@ if [[ "$tagname" != "$header_tagname" ]]; then fi echo "version check SUCCEEDED" -echo - +echo