Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
outputs:
tag_name: ${{ steps.tag.outputs.tag_name }}
version_number: ${{ steps.tag.outputs.version_number }}

steps:
- name: Checkout code
Expand All @@ -133,8 +136,11 @@ jobs:
id: tag
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
VERSION_NUMBER=${TAG_NAME#v}
echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT
echo "version_number=$VERSION_NUMBER" >> $GITHUB_OUTPUT
echo "Tag name: $TAG_NAME"
echo "Version number: $VERSION_NUMBER"

- name: Prepare release files
run: |
Expand Down Expand Up @@ -168,4 +174,6 @@ jobs:
uses: ./.github/workflows/run-linear-release.yml
with:
action: complete
name: Release ${{ needs.release.outputs.version_number }}
version: ${{ needs.release.outputs.tag_name }}
secrets: inherit
27 changes: 26 additions & 1 deletion .github/workflows/run-linear-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ on:
description: "Action to perform"
required: true
type: string
name:
description: "Release name (used by complete)"
required: false
type: string
version:
description: "Release version (used by complete)"
required: false
type: string

workflow_dispatch:
inputs:
Expand All @@ -17,6 +25,14 @@ on:
options:
- sync
- complete
name:
description: "Release name (used by complete)"
required: false
type: string
version:
description: "Release version (used by complete)"
required: false
type: string

permissions:
contents: read
Expand Down Expand Up @@ -60,6 +76,15 @@ jobs:
- name: Complete release
env:
LINEAR_ACCESS_KEY: ${{ secrets.LINEAR_RELEASE_MANAGEMENT_ACCESS_KEY }}
RELEASE_NAME: ${{ inputs.name }}
RELEASE_VERSION: ${{ inputs.version }}
run: |
chmod +x linear-release
./linear-release complete
args=()
if [ -n "$RELEASE_NAME" ]; then
args+=("--name=$RELEASE_NAME")
fi
if [ -n "$RELEASE_VERSION" ]; then
args+=("--release-version=$RELEASE_VERSION")
fi
./linear-release complete "${args[@]}"
Loading