Skip to content

Upgrade Actions versions and use non-deprecated release action #82

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
matrix:
java: ['11', '17']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
Expand Down
23 changes: 9 additions & 14 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,29 @@ on:
tags:
- '*'

permissions:
contents: write

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
- name: Build distribution
run: ./gradlew :adapter:distZip
- name: Create release
uses: actions/create-release@v1
id: create_release
uses: softprops/action-gh-release@v1
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably just use the gh CLI like we do for the language server, that way we don't have to pull in another third-party action: https://github.com/fwcd/kotlin-language-server/blob/eee8afa9b6b92c4c5ae445823b3719818d595ec1/.github/workflows/deploy.yml#L27-L45

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Version ${{ github.ref }}
name: Version ${{ github.ref }}
draft: false
prerelease: false
- name: Upload asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./adapter/build/distributions/adapter.zip
asset_name: adapter.zip
asset_content_type: application/zip
files: |
./adapter/build/distributions/adapter.zip