Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: explicitly set latest tag when creating release. #3270

Merged
merged 2 commits into from
Oct 13, 2024
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
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
Loading