Skip to content

fix contents

fix contents #15

Workflow file for this run

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Publish .NET app to GitHub Releases
on:
push:
tags:
- "v*.*.*"
#release:
# types: [published]
workflow_dispatch:
jobs:
release:
name: Release
strategy:
matrix:
#kind: ['windows', 'linux', 'macOS']
kind: ['windows']
include:
- kind: windows
os: windows-latest
target: win-x64
#- kind: linux
# os: ubuntu-latest
# target: linux-x64
#- kind: macOS
# os: macos-latest
# target: osx-x64
runs-on: ${{ matrix.os }}
permissions:
contents: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Build
shell: bash
run: |
tag=$(git describe --tags --abbrev=0)
release_name="FtpsFileMirror-$tag-${{ matrix.target }}"
github_url=${{ github.server_url }}/${{ github.repository }}
# Build everything
dotnet publish FtpsClient/FtpsClient.csproj --runtime "${{ matrix.target }}" --no-self-contained -c Release -o "$release_name"
echo See sources: $github_url > "$release_name/readme.txt"
# Pack files
if [ "${{ matrix.target }}" == "win-x64" ]; then
7z a -tzip "${release_name}.zip" "./${release_name}/*"
else
tar czvf "${release_name}.tar.gz" "$release_name"
fi
# Delete output directory
rm -r "$release_name"
- name: Publish
uses: softprops/action-gh-release@v1
with:
files: "Ftps*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}