diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..56bafad --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,35 @@ +# This workflow will run every time a new release is created. + +name: Build and release +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up JDK 11 + uses: action-setup-java@v2 + with: + distribution: temurin + java-version: 11 + + - name: Setup workspace + run: mkdir artifacts + + - name: Build with Maven + run: | + mvn clean package --file pom.xml + cp MKVAudioSubtitleChanger/target/M*.jar artifacts/ + + - name: Upload artifacts + uses: skx/github-action-publish-binaries@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + args: 'artifacts/M*' +