Skip to content

feat: make send to discord more robust #44

feat: make send to discord more robust

feat: make send to discord more robust #44

Workflow file for this run

name: Build
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
gotify-version: ["2.5.0", "2.6.1", "2.7.3"]
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Plugin
env:
GOTIFY_VERSION: "${{ matrix.gotify-version }}"
run: |
make download-tools
make build
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.gotify-version }}
path: build/*.so
release:
name: Release Plugin
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Download Build Artifacts
uses: actions/download-artifact@v4
with:
path: build
pattern: build-*
merge-multiple: true
- run: ls -la build
- name: Tag the repository
id: tag
run: |
# See https://docs.github.com/en/get-started/using-git/dealing-with-special-characters-in-branch-and-tag-names
TAG=v$(date -Iseconds | sed 's/[T:\+]/-/g')
TIME=$(date '+%Y/%m/%d %H:%M')
echo "$TAG"
echo "tag=$TAG" >> $GITHUB_OUTPUT
echo "time=$TIME" >> $GITHUB_OUTPUT
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git tag -a $TAG -m "Published version $TAG" ${GITHUB_SHA}
git push origin $TAG
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: build/*.so
tag_name: ${{ steps.tag.outputs.tag }}
name: ${{ steps.tag.outputs.time }}