Skip to content

chore(deps): remove lavaplayer native (#192) #11

chore(deps): remove lavaplayer native (#192)

chore(deps): remove lavaplayer native (#192) #11

Workflow file for this run

name: πŸš€ Release
on:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
env:
IMAGE_NAME: vcspeaker.kt
jobs:
bump-version:
name: πŸ”Ό Bump version
runs-on: ubuntu-latest
outputs:
version: ${{ steps.semantic.outputs.new_release_version }}
tag: ${{ steps.semantic.outputs.new_release_git_tag }}
changelog: ${{ steps.semantic.outputs.new_release_notes }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: πŸ”Ό Semantic Release
id: semantic
uses: cycjimmy/semantic-release-action@v4
with:
extra_plugins: |
conventional-changelog-conventionalcommits@^7.0.2
env:
GITHUB_TOKEN: ${{ github.token }}
build-docker:
name: πŸ—οΈ Build Docker (${{ matrix.architecture }})
runs-on: ubuntu-latest
needs: bump-version
strategy:
fail-fast: false
matrix:
architecture: [ amd64, arm64 ]
steps:
- name: πŸ“₯ Checkout ${{ github.repository }}
uses: actions/checkout@v4
- name: πŸ‹ Setup QEMU
uses: docker/setup-qemu-action@v3
- name: πŸ—οΈ Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: πŸ“₯ Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: πŸ“ Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
with:
images: ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=${{ needs.bump-version.outputs.version }}-${{ matrix.architecture }}
type=raw,value=latest-${{ matrix.architecture }}
- name: πŸš€ Build Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
platforms: linux/${{ matrix.architecture }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
provenance: false
merge-latest:
name: πŸ“₯ Merge latest
runs-on: ubuntu-latest
needs:
- bump-version
- build-docker
steps:
- name: πŸ“₯ Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create and push manifest images (latest)
uses: Noelware/[email protected]
with:
images: ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest-amd64,ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest-arm64
inputs: ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest
push: true
- name: Create and push manifest images (version)
uses: Noelware/[email protected]
with:
images: ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ needs.bump-version.outputs.version }}-amd64,ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ needs.bump-version.outputs.version }}-arm64
inputs: ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ needs.bump-version.outputs.version }}
push: true
create-release:
name: πŸ“¦ Create Release
runs-on: ubuntu-latest
needs:
- bump-version
- build-docker
- merge-latest
steps:
- name: β˜• Setup Zulu JDK 17
uses: actions/[email protected]
with:
distribution: zulu
java-version: 17
- name: 🐘 Setup Gradle
uses: gradle/gradle-build-action@v3
with:
gradle-version: release-candidate
- name: πŸ“₯ Checkout ${{ github.repository }}
uses: actions/checkout@v4
- name: βŒ› Restore caches
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: 🐘 Run Gradle command
run: |
gradle build
mv build/libs/*.jar build/libs/vcspeaker-kt.jar
- name: πŸ—ƒοΈ Publish Release on main
uses: softprops/action-gh-release@v2
with:
body: ${{ needs.bump-version.outputs.changelog }}
tag_name: ${{ needs.bump-version.outputs.tag }}
target_commitish: ${{ github.sha }}
files: |
build/libs/vcspeaker-kt.jar