mirror of
https://github.com/phin05/discord-rich-presence-plex
synced 2024-11-25 19:10:18 +00:00
54 lines
1.8 KiB
YAML
54 lines
1.8 KiB
YAML
name: Release
|
|
run-name: Release ${{ github.ref_name }}
|
|
on:
|
|
push:
|
|
tags:
|
|
- v*
|
|
workflow_dispatch:
|
|
jobs:
|
|
release-zip:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
env:
|
|
RELEASE_ZIP_FILENAME: ${{ github.event.repository.name }}-${{ github.ref_name }}.zip
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- name: Create release ZIP file
|
|
run: |-
|
|
mv .github/release-notes ../
|
|
xargs rm -rf < .dockerignore
|
|
mkdir ${{ github.event.repository.name }}
|
|
mv * ${{ github.event.repository.name }} || true
|
|
zip -r $RELEASE_ZIP_FILENAME ${{ github.event.repository.name }}
|
|
- name: Release on GitHub
|
|
uses: softprops/action-gh-release@4634c16e79c963813287e889244c50009e7f0981
|
|
with:
|
|
files: ${{ env.RELEASE_ZIP_FILENAME }}
|
|
body_path: ../release-notes/${{ github.ref_name }}.md
|
|
release-docker:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
packages: write
|
|
env:
|
|
DOCKER_IMAGE_NAME: ghcr.io/${{ github.actor }}/${{ github.event.repository.name }}
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- name: Sign into GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
- name: Build and push Docker images
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7
|
|
push: true
|
|
provenance: false
|
|
tags: ${{ env.DOCKER_IMAGE_NAME }}:${{ github.ref_name }},${{ env.DOCKER_IMAGE_NAME }}:latest
|