diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..98e5b67c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,32 @@ +name: Create releases +on: + push: + tags: + - v* +jobs: + build: + runs-on: ubuntu-latest + container: registry.gitlab.com/josm/docker-library/openjdk-8-josmplugin:latest + steps: + - uses: actions/checkout@v2.3.4 + - run: ./gradlew dist + - name: Release to GitHub + id: release_to_github + uses: actions/create-release@v1.1.4 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + - name: Add file to release + id: add_file_to_release + uses: actions/upload-release-asset@v1.0.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.release_to_github.outputs.upload_url }} + asset_path: ./build/dist/pt_assistant.jar + asset_name: pt_assistant.jar + asset_content_type: application/java-archive diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1100ba64..00000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# Default settings for build stages -language: java -jdk: openjdk8 - -script: ./gradlew build compileJava_minJosm compileJava_latestJosm --stacktrace -dist: trusty -deploy: - provider: releases - file_glob: true - api_key: "$GITHUB_TOKEN" - file: - - "build/dist/pt_assistant.jar" - skip_cleanup: true - on: - condition: -n $GITHUB_TOKEN - tags: true - jdk: openjdk8