-
-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af0ce83
commit 7ca3118
Showing
1 changed file
with
59 additions
and
17 deletions.
There are no files selected for viewing
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
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 | ||
|
||
|
@@ -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 |