Skip to content

Commit 41ed8c0

Browse files
authored
Merge pull request #3854 from joshuataylor/feature/pre-release-tag
Make a single action to build canary releases
2 parents 2db41e2 + 5762b26 commit 41ed8c0

3 files changed

Lines changed: 14 additions & 58 deletions

File tree

.github/workflows/publish-canary.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ jobs:
2727

2828
- name: Build with Gradle
2929
id: build-plugin
30-
run: ./gradlew buildPlugin --no-scan -PpublishChannels=default -PisRelease=true --stacktrace
30+
run: ./gradlew buildPlugin --no-scan -PpublishChannels=default --stacktrace

.github/workflows/tag.yml

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ jobs:
3737
needs: [ test-and-verify ]
3838
if: ${{ always() && (needs.test-and-verify.result == 'success' || needs.test-and-verify.result == 'skipped') }}
3939
runs-on: ubuntu-22.04
40+
permissions:
41+
contents: write
4042
steps:
4143
- name: Checkout
4244
id: checkout
@@ -49,35 +51,24 @@ jobs:
4951
github-token: ${{ secrets.GITHUB_TOKEN }}
5052
skip-searchable-options: 'false'
5153

52-
- name: Build with Gradle
53-
id: build-plugin
54-
run: ./gradlew buildPlugin --no-scan -PpublishChannels=default -PisRelease=true
54+
- name: Build with Gradle (canary)
55+
id: build-plugin-canary
56+
if: ${{ inputs.prerelease }}
57+
run: ./gradlew buildPlugin --no-scan -PpublishChannels=canary --stacktrace
5558

56-
- name: Export ASSET_PATH
57-
run: echo "ASSET_PATH=$(ls -1 build/distributions/intellij-elixir-*.zip)" >> $GITHUB_ENV
58-
59-
- name: Tag Commit
60-
id: tag-commit
61-
uses: mathieudutour/github-tag-action@v6.2
62-
with:
63-
github_token: ${{ secrets.GITHUB_TOKEN }}
64-
custom_tag: ${{ inputs.tag }}
65-
tag_prefix: ''
59+
- name: Build with Gradle (release)
60+
id: build-plugin-default
61+
if: ${{ !inputs.prerelease }}
62+
run: ./gradlew buildPlugin --no-scan -PpublishChannels=default --stacktrace
6663

6764
- name: Create Release
6865
id: create_release
69-
uses: softprops/action-gh-release@v2.5.0
70-
env:
71-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
uses: softprops/action-gh-release@v3.0.0
7267
with:
7368
tag_name: ${{ inputs.tag }}
69+
target_commitish: ${{ github.sha }}
7470
name: ${{ inputs.tag }}
7571
prerelease: ${{ inputs.prerelease }}
7672
make_latest: ${{ inputs.make_latest }}
77-
files: ${{ env.ASSET_PATH }}
73+
files: build/distributions/intellij-elixir-*.zip
7874
fail_on_unmatched_files: true
79-
80-
# - name: Publish
81-
# env:
82-
# JET_BRAINS_MARKETPLACE_TOKEN: ${{ secrets.JetBrainsMarketplaceToken }}
83-
# run: ./gradlew --stacktrace publishPlugin

0 commit comments

Comments
 (0)