|
| 1 | +name: Deploy |
| 2 | +on: |
| 3 | + push: |
| 4 | + tags: |
| 5 | + - '*' |
| 6 | + |
| 7 | +jobs: |
| 8 | + deploy: |
| 9 | + runs-on: ubuntu-latest |
| 10 | + steps: |
| 11 | + - uses: actions/checkout@v2 |
| 12 | + - name: Setup JDK |
| 13 | + uses: actions/setup-java@v1 |
| 14 | + with: |
| 15 | + java-version: 11 |
| 16 | + - name: Build distribution |
| 17 | + run: ./gradlew :server:distZip :grammars:distZip |
| 18 | + - name: Create release |
| 19 | + uses: actions/create-release@v1 |
| 20 | + id: create_release |
| 21 | + env: |
| 22 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 23 | + with: |
| 24 | + tag_name: ${{ github.ref }} |
| 25 | + release_name: Version ${{ github.ref }} |
| 26 | + draft: false |
| 27 | + prerelease: false |
| 28 | + - name: Upload server asset |
| 29 | + uses: actions/upload-release-asset@v1 |
| 30 | + env: |
| 31 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 32 | + with: |
| 33 | + upload_url: ${{ steps.create_release.outputs.upload_url }} |
| 34 | + asset_path: ./server/build/distributions/server.zip |
| 35 | + asset_name: server.zip |
| 36 | + asset_content_type: application/zip |
| 37 | + - name: Upload grammar asset |
| 38 | + uses: actions/upload-release-asset@v1 |
| 39 | + env: |
| 40 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 41 | + with: |
| 42 | + upload_url: ${{ steps.create_release.outputs.upload_url }} |
| 43 | + asset_path: ./grammars/build/distributions/grammars.zip |
| 44 | + asset_name: grammars.zip |
| 45 | + asset_content_type: application/zip |
| 46 | + |
| 47 | + # deploy: |
| 48 | + # - stage: "Deploy" |
| 49 | + # before_deploy: |
| 50 | + # - ./gradlew :server:distZip :grammars:distZip --no-watch-fs |
| 51 | + # deploy: |
| 52 | + # # Binaries (GitHub Releases) |
| 53 | + # - provider: releases |
| 54 | + # api_key: "$GITHUB_TOKEN" |
| 55 | + # file_glob: true |
| 56 | + # file: |
| 57 | + # - "server/build/distributions/*.zip" |
| 58 | + # - "grammars/build/distributions/*.zip" |
| 59 | + # skip_cleanup: true |
| 60 | + # name: "Version $TRAVIS_TAG" |
| 61 | + # on: |
| 62 | + # tags: true |
| 63 | + # repo: fwcd/kotlin-language-server |
| 64 | + |
| 65 | + # # Maven (GitHub Packages) |
| 66 | + # - provider: script |
| 67 | + # script: bash scripts/maven-deploy.sh |
| 68 | + # skip_cleanup: true |
| 69 | + # on: |
| 70 | + # tags: true |
| 71 | + # repo: fwcd/kotlin-language-server |
| 72 | + |
| 73 | + # # Docker (GitHub Packages) |
| 74 | + # - provider: script |
| 75 | + # script: bash scripts/docker-deploy.sh |
| 76 | + # skip_cleanup: true |
| 77 | + # on: |
| 78 | + # tags: true |
| 79 | + # repo: fwcd/kotlin-language-server |
0 commit comments