Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
KoalaBear84 authored May 18, 2020
1 parent af0ce83 commit 7ca3118
Showing 1 changed file with 59 additions and 17 deletions.
76 changes: 59 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
name: Continuous Integration

on: push
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
build:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}

runs-on: ubuntu-latest

env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1

Expand All @@ -24,34 +27,73 @@ jobs:
- name: Test with dotnet
run: dotnet test OpenDirectoryDownloader --configuration Release

- name: Publish with dotnet
run: dotnet publish OpenDirectoryDownloader --configuration Release -o ./artifacts
- name: Publish with dotnet win-x64
run: dotnet publish OpenDirectoryDownloader --configuration Release --framework netcoreapp3.1 --runtime win-x64 --no-self-contained --output ./OpenDirectoryDownloader-win-x64

- name: Zipping win-x64
uses: papeloto/action-zip@v1
with:
files: ./OpenDirectoryDownloader-win-x64
dest: OpenDirectoryDownloader-win-x64.zip

- name: Publish with dotnet linux-x64
run: dotnet publish OpenDirectoryDownloader --configuration Release --framework netcoreapp3.1 --runtime linux-x64 --no-self-contained --output ./OpenDirectoryDownloader-linux-x64

- name: Zipping
- name: Zipping linux-x64
uses: papeloto/action-zip@v1
with:
files: ./artifacts
dest: OpenDirectoryDownloader-windows.zip
files: ./OpenDirectoryDownloader-linux-x64
dest: OpenDirectoryDownloader-linux-x64.zip

- name: Publish with dotnet osx-x64
run: dotnet publish OpenDirectoryDownloader --configuration Release --framework netcoreapp3.1 --runtime osx-x64 --no-self-contained --output ./OpenDirectoryDownloader-osx-x64

- name: Zipping osx-x64
uses: papeloto/action-zip@v1
with:
files: ./OpenDirectoryDownloader-osx-x64
dest: OpenDirectoryDownloader-osx-x64.zip

- name: Create release
id: create_release
uses: actions/create-release@latest
uses: actions/create-release@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: OpenDirectoryDownloader ${{ github.ref }}
body: ${{ github.event.commits[0].message }}
draft: true
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
allowUpdates: true

- name: Upload Release Asset
- name: Upload Release Asset win-x64
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./OpenDirectoryDownloader-win-x64.zip
asset_name: OpenDirectoryDownloader-win-x64.zip
asset_content_type: application/zip

- name: Upload Release Asset linux-x64
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./OpenDirectoryDownloader-linux-x64.zip
asset_name: OpenDirectoryDownloader-linux-x64.zip
asset_content_type: application/zip


- name: Upload Release Asset osx-x64
id: upload-release-asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: OpenDirectoryDownloader-windows.zip
asset_name: OpenDirectoryDownloader-windows.zip
asset_path: ./OpenDirectoryDownloader-osx-x64.zip
asset_name: OpenDirectoryDownloader-osx-x64.zip
asset_content_type: application/zip

0 comments on commit 7ca3118

Please sign in to comment.