Merge pull request #3 from oscar-wos/1.3.1 #62
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
name: Build and Release | |
on: | |
push: | |
branches: | |
- main | |
pull_request_review: | |
types: | |
- submitted | |
issue_comment: | |
types: | |
- created | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build -c Release | |
release: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build -c Release | |
- name: Publish | |
run: dotnet publish -c Release --output ./publish | |
- name: Create Directories | |
run: | | |
mkdir -p plugin/plugins/Sessions | |
mkdir -p plugin/shared/Sessions | |
mv ./src/bin/Release/net8.0/* ./plugin/plugins/Sessions | |
mv ./Sessions.API/bin/Release/* ./plugin/shared/Sessions | |
- name: Zip | |
run: zip -r Sessions.zip ./plugin | |
- name: Publish | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Sessions.zip | |
path: plugin | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
body: | | |
This is an automated release. | |
draft: false | |
prerelease: false | |
- name: Upload Release Asset | |
id: 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: ./ | |
asset_name: Sessions.zip | |
asset_content_type: application/zip |