Skip to content

Commit

Permalink
ci: explicitly set latest tag when creating release. (#3270)
Browse files Browse the repository at this point in the history
  • Loading branch information
icycodes authored Oct 13, 2024
1 parent f0850a0 commit 2f97888
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/release-intellij.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,8 @@ jobs:
run: pnpm install

- name: Determine Publish Channel
env:
VERSION_STRING:
run: |
if [[ ${{ github.ref_name }} =~ intellij@[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
if [[ ${{ github.ref_name }} =~ ^intellij@[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "PUBLISH_CHANNEL=stable" >> $GITHUB_ENV
else
echo "PUBLISH_CHANNEL=alpha" >> $GITHUB_ENV
Expand Down Expand Up @@ -130,11 +128,23 @@ jobs:
arguments: signPlugin
build-root-directory: clients/intellij

- name: Determine is stable release
run: |
if [[ ${{ github.ref_name }} =~ ^intellij@[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "STABLE_RELEASE=true" >> $GITHUB_ENV
else
echo "STABLE_RELEASE=false" >> $GITHUB_ENV
fi
- name: Check if stable release
run: echo "Stable Release is ${{ env.STABLE_RELEASE }}"

- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
prerelease: true
prerelease: ${{ env.STABLE_RELEASE == 'false' }}
makeLatest: false
tag: ${{ github.ref_name }}
removeArtifacts: true
artifacts: "clients/intellij/build/distributions/intellij-tabby-signed.zip"
16 changes: 14 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,23 @@ jobs:
- name: Display structure of created files
run: ls -R dist

- name: Determine is stable release
run: |
if [[ ${{ github.ref_name }} =~ ^v@[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "STABLE_RELEASE=true" >> $GITHUB_ENV
else
echo "STABLE_RELEASE=false" >> $GITHUB_ENV
fi
- name: Check if stable release
run: echo "Stable Release is ${{ env.STABLE_RELEASE }}"

- uses: ncipollo/release-action@v1
if: github.event_name == 'push'
with:
allowUpdates: true
prerelease: true
allowUpdates: true
prerelease: ${{ env.STABLE_RELEASE == 'false' }}
makeLatest: ${{ env.STABLE_RELEASE == 'true' }}
artifacts: "dist/tabby_*.zip"
tag: ${{ github.ref_name }}
removeArtifacts: true

0 comments on commit 2f97888

Please sign in to comment.