Skip to content

Merge branch 'master' of https://github.com/VenityNetwork/WaterdogPE2… #3

Merge branch 'master' of https://github.com/VenityNetwork/WaterdogPE2…

Merge branch 'master' of https://github.com/VenityNetwork/WaterdogPE2… #3

name: Release Build
on:
workflow_dispatch:
push:
tags-ignore:
- '**'
branches:
- '**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set version to release
run: |
sed -i -e s/#build/"release"/g ./src/main/java/dev/waterdog/waterdogpe/VersionInfo.java
- name: Build
uses: ./.github/actions/build
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
perform_deploy: true
deploy_repository: "waterdog-releases"
deploy_username: ${{ secrets.DEPLOY_USERNAME }}
deploy_password: ${{ secrets.DEPLOY_PASSWORD }}
create_prerelease: false # Use custom release step
- name: Create release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
target/Waterdog.jar
- name: Docker Login
uses: docker/login-action@v1
with:
registry: "ghcr.io"
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: "ghcr.io/${{ github.repository }}"
tags: |
type=semver,pattern={{version}}
type=raw,value=release
- name: Docker build and push
id: docker_build
uses: docker/build-push-action@v4
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}