diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8affe01 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: CI +on: + workflow_dispatch: + push: + branches: [ master ] +jobs: + build-test-release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v2 + with: + distribution: adopt + java-version: 8 + cache: maven + - run: mvn test + - run: mvn -B package --file pom.xml + - run: "echo '::set-output name=name::build-'$(date +%Y-%m-%d-%H%M)" #$(date +%Y%m%d-%H%M%S) #$(git rev-parse HEAD | cut -c 1-8) #LATEST #$(basename "${{ github.ref }}") + id: release-name + - uses: actions/create-release@v1 + id: create_release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ steps.release-name.outputs.name }} + release_name: ${{ steps.release-name.outputs.name }} + draft: true + prerelease: false + - uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./target/coingecko-java-1.0-SNAPSHOT.jar + asset_name: coingecko-java-${{ steps.release-name.outputs.name }}.jar + asset_content_type: application/zip + - uses: eregon/publish-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + release_id: ${{ steps.create_release.outputs.id }} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 874e25a..faf2789 100644 --- a/pom.xml +++ b/pom.xml @@ -31,8 +31,8 @@ org.projectlombok lombok - 1.18.10 provided + 1.18.22