This reverts commit 840d3f99ed.
This was a nice idea in theory, but in practice this means that the
build jobs do not run at all on the default branch anymore. This means
the caches they push to won't be used by any other jobs, neither on the
tag pipelines, nor on PRs. This in turn makes all of these jobs really
slow.
Not helpful!
70 lines
1.6 KiB
YAML
70 lines
1.6 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- v[0-9]+
|
|
|
|
jobs:
|
|
check:
|
|
name: Check
|
|
uses: ./.github/workflows/check.yaml
|
|
secrets:
|
|
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
|
|
|
|
|
docs:
|
|
name: Docs
|
|
uses: ./.github/workflows/docs.yaml
|
|
secrets:
|
|
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
|
|
|
|
|
test:
|
|
name: Test
|
|
uses: ./.github/workflows/test.yaml
|
|
secrets:
|
|
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
|
|
build:
|
|
name: Build
|
|
uses: ./.github/workflows/build.yaml
|
|
secrets:
|
|
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
|
|
|
|
|
tag:
|
|
name: Tag
|
|
concurrency:
|
|
# Never tag outdated commits on the main branch by skipping superseded commits
|
|
group: ci-tag-${{ (github.ref == 'refs/heads/main' && github.ref) || github.run_id }}
|
|
cancel-in-progress: true
|
|
if: vars.RELEASE_ENABLED
|
|
runs-on: ubuntu-slim
|
|
needs:
|
|
- docs
|
|
- test
|
|
- build
|
|
steps:
|
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
with:
|
|
ssh-key: ${{ secrets.POSTGREST_SSH_KEY }}
|
|
- name: Tag latest commit
|
|
run: |
|
|
cabal_version="$(grep -oP '^version:\s*\K.*' postgrest.cabal)"
|
|
|
|
if [[ "$cabal_version" == *.* ]]; then
|
|
git fetch --tags
|
|
|
|
if [ -z "$(git tag --list "v$cabal_version")" ]; then
|
|
git tag "v$cabal_version"
|
|
git push origin "v$cabal_version"
|
|
fi
|
|
else
|
|
git tag -f "devel"
|
|
git push -f origin "devel"
|
|
fi
|