mirror of
https://github.com/Flowseal/zapret-discord-youtube.git
synced 2026-08-05 15:45:52 +03:00
Release workflow
This commit is contained in:
44
.github/workflows/release.yml
vendored
Normal file
44
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
tag:
|
||||||
|
description: 'Release tag'
|
||||||
|
required: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Verify version matches version.txt
|
||||||
|
run: |
|
||||||
|
VERSION=$(cat .service/version.txt)
|
||||||
|
if [ "$VERSION" != "${{ github.event.inputs.tag }}" ]; then
|
||||||
|
echo "Error: tag '${{ github.event.inputs.tag }}' does not match .service/version.txt ('$VERSION')"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Install RAR
|
||||||
|
run: sudo apt-get install -y rar
|
||||||
|
|
||||||
|
- name: Create archives
|
||||||
|
run: |
|
||||||
|
NAME="zapret-discord-youtube-${{ github.event.inputs.tag }}"
|
||||||
|
zip -r "${NAME}.zip" bin/ lists/ utils/ *.bat
|
||||||
|
rar a "${NAME}.rar" bin/ lists/ utils/ *.bat
|
||||||
|
|
||||||
|
- name: Create GitHub Release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
tag_name: ${{ github.event.inputs.tag }}
|
||||||
|
name: ${{ github.event.inputs.tag }}
|
||||||
|
files: |
|
||||||
|
zapret-discord-youtube-${{ github.event.inputs.tag }}.zip
|
||||||
|
zapret-discord-youtube-${{ github.event.inputs.tag }}.rar
|
||||||
Reference in New Issue
Block a user