Merge pull request #2 from blakeZTL/dev #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build a .NET project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
name: .NET | |
on: | |
push: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 7.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore | |
- name: Publish | |
run: dotnet publish -r win10-x64 --self-contained true -p:PublishSingleFile=true -p:EnableCompressionInSingleFile=true | |
- name: Install Zip | |
run: sudo apt-get install zip | |
- name: Zip the output | |
run: | | |
zip -j EntityMetadataExtractor.zip "/home/runner/work/entity-metadata-extractor/entity-metadata-extractor/Entity Metadata Extractor/bin/Release/net7.0/win10-x64/publish/Entity Metadata Extractor.exe" | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.run_id }} | |
release_name: Release ${{ github.run_id }} | |
draft: false | |
prerelease: false | |
- name: Upload Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./EntityMetadataExtractor.zip | |
asset_name: EntityMetadataExtractor.zip | |
asset_content_type: application/zip |