Skip to content

Commit

Permalink
GitHubCI: upload binaries as artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
knocte committed Jan 10, 2024
1 parent dcfc11f commit e10a939
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,23 +57,32 @@ jobs:
# Define some variables for things we need
tag=$(git describe --tags --abbrev=0)
release_name="Jellyfin.Plugins.Telegram-$tag-${{ matrix.target }}"
bin_dir="bin/"
# Build everything
dotnet publish Jellyfin.Plugins.Telegram/Jellyfin.Plugins.Telegram.csproj --runtime "${{ matrix.target }}" -c Release -o "$release_name"
# Pack files
mkdir -p $bin_dir
if [ "${{ matrix.target }}" == "win-x64" ]; then
7z a -tzip "${release_name}.zip" "./${release_name}/*"
7z a -tzip "$bin_dir/${release_name}.zip" "./${release_name}/*"
else
tar czvf "${release_name}.tar.gz" "$release_name"
tar czvf "$bin_dir/${release_name}.tar.gz" "$release_name"
fi
# Delete output directory
rm -r "$release_name"
- uses: actions/upload-artifact@v3
name: Upload binaries as artifact
with:
name: ${{ matrix.os }} Binaries
path: ./bin/*.*

- name: Publish
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: "Jellyfin.Plugins.Telegram*"
files: "./bin/Jellyfin.Plugins.Telegram*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit e10a939

Please sign in to comment.