Skip to content

Commit ff41d83

Browse files
linear release gh action
1 parent 29dfe17 commit ff41d83

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Linear Release
2+
3+
on:
4+
workflow_run:
5+
workflows: [ "Release Sourcebot (Production)" ]
6+
types:
7+
- completed
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
linear-release:
14+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
with:
20+
ref: main
21+
fetch-depth: 0
22+
23+
- name: Extract version from release
24+
id: extract_version
25+
run: |
26+
# Get the latest version from CHANGELOG.md (first non-Unreleased version)
27+
VERSION=$(grep -oP '## \[\K[0-9]+\.[0-9]+\.[0-9]+' CHANGELOG.md | head -n 1)
28+
29+
if [ -z "$VERSION" ]; then
30+
echo "Error: Could not extract version from CHANGELOG.md"
31+
exit 1
32+
fi
33+
34+
echo "Detected version: $VERSION"
35+
echo "version=$VERSION" >> $GITHUB_OUTPUT
36+
37+
- uses: linear/linear-release-action@v0
38+
with:
39+
access_key: ${{ secrets.LINEAR_ACCESS_KEY }}
40+
version: ${{ steps.extract_version.outputs.version }}

0 commit comments

Comments
 (0)