-
Notifications
You must be signed in to change notification settings - Fork 273
40 lines (33 loc) · 1.23 KB
/
linear-release.yml
File metadata and controls
40 lines (33 loc) · 1.23 KB
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
40
name: Linear Release
on:
workflow_run:
workflows: [ "Release Sourcebot (Production)" ]
types:
- completed
permissions:
contents: read
jobs:
linear-release:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
- name: Extract version from release
id: extract_version
run: |
# Get the latest version from CHANGELOG.md (first non-Unreleased version)
VERSION=$(grep -oP '## \[\K[0-9]+\.[0-9]+\.[0-9]+' CHANGELOG.md | head -n 1)
if [ -z "$VERSION" ]; then
echo "Error: Could not extract version from CHANGELOG.md"
exit 1
fi
echo "Detected version: $VERSION"
echo "version=$VERSION" >> $GITHUB_OUTPUT
- uses: linear/linear-release-action@v0
with:
access_key: ${{ secrets.LINEAR_ACCESS_KEY }}
version: ${{ steps.extract_version.outputs.version }}