Skip to content

Release

Release #212

Workflow file for this run

name: Release
on:
push:
workflow_dispatch:
jobs:
build:
if: "github.event_name == 'workflow_dispatch'"
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2.4.2
- name: Set up JDK 17
uses: actions/setup-java@v3.4.1
with:
java-version: 17
distribution: temurin
cache: gradle
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Build artifacts
run: ./gradlew build
- name: Set outputs
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- uses: avakar/tag-and-release@v1
id: release
with:
tag_name: ${{ steps.vars.outputs.sha_short }}
draft: true
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Clean useless artifacts
run: |
rm -f \
build/libs/*-dev.jar \
build/libs/*-dev-all.jar
- name: Generate Checksum
uses: jmgilman/actions-generate-checksum@v1.0.0
with:
method: md5
patterns: build/libs/AntiPopup-*.jar
- name: upload file on release
uses: Fhwang0926/upload-release-asset@v1.1.17
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_name: checksum.txt
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload artifacts & release assets
uses: nanoufo/action-upload-artifacts-and-release-assets@v1.4
with:
path: build/libs/AntiPopup-*.jar
release-upload-url: ${{ steps.release.outputs.upload_url }}
upload-release-files: true
env:
GITHUB_TOKEN: ${{ github.token }}