-
Notifications
You must be signed in to change notification settings - Fork 61
39 lines (35 loc) · 1.24 KB
/
cicd.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: CI/CD
on: [ push ]
jobs:
setup:
runs-on: ubuntu-latest
outputs:
effective-branch: ${{ steps.git-meta.outputs.EFFECTIVE_BRANCH }}
release: ${{ startsWith(github.ref, 'refs/tags/') }}
version: ${{ steps.git-meta.outputs.CURRENT_VERSION }}
env:
SINCE_VERSION: "0.15.5"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Install since
run: |
cd "$( mktemp -d )"
curl --fail -L -o since.tar.gz https://github.com/release-tools/since/releases/download/v${SINCE_VERSION}/since_${SINCE_VERSION}_linux_amd64.tar.gz
tar xvf since.tar.gz
cp since /usr/local/bin
- name: Determine effective branch
id: git-meta
run: |
echo "EFFECTIVE_BRANCH=$( ./scripts/get-effective-branch.sh )" >> $GITHUB_OUTPUT
echo "CURRENT_VERSION=$( since project version --current --log-level=info )" >> $GITHUB_OUTPUT
ci:
needs: [setup]
uses: ./.github/workflows/pipeline.yaml
with:
effective-branch: ${{ needs.setup.outputs.effective-branch }}
release: ${{ needs.setup.outputs.release == 'true' }}
version: ${{ needs.setup.outputs.version }}
secrets: inherit