Skip to content

Commit

Permalink
release workflow updates
Browse files Browse the repository at this point in the history
  • Loading branch information
PrzemyslawSwiderski committed May 1, 2024
1 parent 74b0070 commit 6b67b34
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/post-release-updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
workflow_call:
inputs:
release-version:
description: 'Release version'
required: true
type: string

Expand Down
18 changes: 15 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ on:
release:
types: [ prereleased, released ]

inputs:
release-version:
description: 'Release version (must match existing tag)'
required: false
default: ${{ github.event.release.tag_name }}

jobs:

# Prepare and publish the plugin to JetBrains Marketplace repository
Expand All @@ -22,7 +28,7 @@ jobs:
- name: Fetch Sources
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name }}
ref: ${{ inputs.release-version }}

# Set up Java environment for the next steps
- name: Setup Java
Expand All @@ -37,6 +43,12 @@ jobs:
with:
gradle-home-cache-cleanup: true

# Update Plugin Version to new one
- name: Update Version
run: |
VERSION="${{ inputs.release-version }}"
sed -i "s/pluginVersion.*/pluginVersion=$VERSION/g" gradle.properties
# Publish the plugin to JetBrains Marketplace
- name: Publish Plugin
env:
Expand All @@ -50,11 +62,11 @@ jobs:
- name: Upload Release Asset
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ github.event.release.tag_name }} ./build/distributions/*
run: gh release upload ${{ inputs.release-version }} ./build/distributions/*

post-release-updates:
name: Post Release Updates
needs: [ release ]
uses: ./.github/workflows/post-release-updates.yml
with:
release-version: ${{ github.event.release.tag_name }}
release-version: ${{ inputs.release-version }}

0 comments on commit 6b67b34

Please sign in to comment.