2022-06-10 16:14:09 -05:00
|
|
|
name: 'Build Plugin'
|
2022-06-10 16:19:07 -05:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2024-04-09 23:56:50 -04:00
|
|
|
branches: [ "10.8" ]
|
2024-04-19 21:41:03 -04:00
|
|
|
paths-ignore:
|
|
|
|
- '**/README.md'
|
|
|
|
- '.github/ISSUE_TEMPLATE/**'
|
|
|
|
- 'docs/**'
|
|
|
|
- 'images/**'
|
|
|
|
- 'manifest.json'
|
2022-06-10 16:19:07 -05:00
|
|
|
pull_request:
|
2024-04-09 23:56:50 -04:00
|
|
|
branches: [ "10.8" ]
|
2024-04-19 21:41:03 -04:00
|
|
|
paths-ignore:
|
|
|
|
- '**/README.md'
|
|
|
|
- '.github/ISSUE_TEMPLATE/**'
|
|
|
|
- 'docs/**'
|
|
|
|
- 'images/**'
|
|
|
|
- 'manifest.json'
|
2022-06-10 16:19:07 -05:00
|
|
|
|
2024-03-01 11:40:05 -05:00
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
|
2022-06-10 16:19:07 -05:00
|
|
|
jobs:
|
|
|
|
build:
|
2024-04-10 07:26:03 -04:00
|
|
|
if: ${{ ! startsWith(github.event.head_commit.message, 'v0.') }}
|
2022-06-10 16:19:07 -05:00
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2023-10-02 13:10:41 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-06-10 16:25:44 -05:00
|
|
|
|
2022-06-10 16:19:07 -05:00
|
|
|
- name: Setup .NET
|
2024-01-01 15:04:34 +00:00
|
|
|
uses: actions/setup-dotnet@v4
|
2022-06-10 16:19:07 -05:00
|
|
|
with:
|
|
|
|
dotnet-version: 6.0.x
|
2022-06-10 16:25:44 -05:00
|
|
|
|
2022-06-10 16:19:07 -05:00
|
|
|
- name: Restore dependencies
|
|
|
|
run: dotnet restore
|
2022-06-10 16:25:44 -05:00
|
|
|
|
2022-06-12 16:57:15 -05:00
|
|
|
- name: Embed version info
|
|
|
|
run: echo "${{ github.sha }}" > ConfusedPolarBear.Plugin.IntroSkipper/Configuration/version.txt
|
|
|
|
|
2024-03-01 11:40:05 -05:00
|
|
|
- name: Retrieve commit identification
|
|
|
|
run: |
|
|
|
|
GIT_HASH=$(git rev-parse --short HEAD)
|
|
|
|
echo "GIT_HASH=${GIT_HASH}" >> $GITHUB_ENV
|
|
|
|
|
2022-06-10 16:19:07 -05:00
|
|
|
- name: Build
|
|
|
|
run: dotnet build --no-restore
|
2022-06-10 23:08:27 -05:00
|
|
|
|
2022-06-10 16:47:46 -05:00
|
|
|
- name: Upload artifact
|
2024-03-04 16:14:35 +00:00
|
|
|
uses: actions/upload-artifact@v4.3.1
|
2024-05-16 05:46:23 -04:00
|
|
|
if: github.event_name != 'pull_request'
|
2022-06-10 16:47:46 -05:00
|
|
|
with:
|
2024-03-06 09:08:04 -05:00
|
|
|
name: ConfusedPolarBear.Plugin.IntroSkipper-${{ env.GIT_HASH }}.dll
|
2022-06-10 16:47:46 -05:00
|
|
|
path: ConfusedPolarBear.Plugin.IntroSkipper/bin/Debug/net6.0/ConfusedPolarBear.Plugin.IntroSkipper.dll
|
|
|
|
if-no-files-found: error
|
2024-03-01 11:40:05 -05:00
|
|
|
|
2024-05-16 05:46:23 -04:00
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-artifact@v4.3.1
|
|
|
|
if: github.event_name == 'pull_request'
|
|
|
|
with:
|
|
|
|
name: ConfusedPolarBear.Plugin.IntroSkipper-${{ github.head_ref }}.dll
|
|
|
|
path: ConfusedPolarBear.Plugin.IntroSkipper/bin/Debug/net6.0/ConfusedPolarBear.Plugin.IntroSkipper.dll
|
|
|
|
retention-days: 7
|
|
|
|
if-no-files-found: error
|
|
|
|
|
2024-03-01 11:40:05 -05:00
|
|
|
- name: Create archive
|
2024-03-04 16:14:31 +00:00
|
|
|
uses: vimtor/action-zip@v1.2
|
2024-03-02 21:05:57 -05:00
|
|
|
if: github.event_name != 'pull_request'
|
2024-03-01 11:40:05 -05:00
|
|
|
with:
|
2024-03-06 19:10:57 -05:00
|
|
|
files: |
|
2024-03-07 21:17:02 -05:00
|
|
|
ConfusedPolarBear.Plugin.IntroSkipper/bin/Debug/net6.0/ConfusedPolarBear.Plugin.IntroSkipper.dll
|
2024-03-01 11:40:05 -05:00
|
|
|
dest: intro-skipper-${{ env.GIT_HASH }}.zip
|
|
|
|
|
2024-03-09 09:10:18 -05:00
|
|
|
- name: Generate md5
|
2024-03-09 09:14:39 -05:00
|
|
|
if: github.event_name != 'pull_request'
|
2024-03-28 23:40:14 -04:00
|
|
|
run: |
|
|
|
|
md5sum intro-skipper-${{ env.GIT_HASH }}.zip > intro-skipper-${{ env.GIT_HASH }}.md5
|
|
|
|
checksum="$(awk '{print $1}' intro-skipper-${{ env.GIT_HASH }}.md5)"
|
|
|
|
echo "CHECKSUM=$checksum" >> $GITHUB_ENV
|
2024-03-09 09:10:18 -05:00
|
|
|
|
2024-03-29 12:22:25 -04:00
|
|
|
- name: Publish prerelease
|
|
|
|
uses: 8bitDream/action-github-releases@v1.0.0
|
|
|
|
if: github.event_name != 'pull_request'
|
|
|
|
with:
|
|
|
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
2024-04-04 09:26:32 -04:00
|
|
|
automatic_release_tag: 10.8/preview
|
2024-03-29 12:22:25 -04:00
|
|
|
prerelease: true
|
|
|
|
title: intro-skipper-${{ env.GIT_HASH }}
|
|
|
|
files: |
|
|
|
|
intro-skipper-${{ env.GIT_HASH }}.zip
|
|
|
|
|
|
|
|
- name: Publish prerelease notes
|
2024-05-11 13:59:46 -04:00
|
|
|
uses: softprops/action-gh-release@v2.0.5
|
2024-03-01 11:40:05 -05:00
|
|
|
if: github.event_name != 'pull_request'
|
|
|
|
with:
|
2024-04-04 09:26:32 -04:00
|
|
|
tag_name: 10.8/preview
|
2024-03-28 23:40:14 -04:00
|
|
|
name: intro-skipper-${{ env.GIT_HASH }}
|
2024-03-31 15:54:54 -04:00
|
|
|
append_body: true
|
2024-03-28 23:40:14 -04:00
|
|
|
body: |
|
2024-03-31 15:54:54 -04:00
|
|
|
---
|
2024-03-28 23:40:14 -04:00
|
|
|
checksum: ${{ env.CHECKSUM }}
|
|
|
|
draft: false
|
|
|
|
prerelease: true
|
|
|
|
env:
|
2024-04-19 21:41:03 -04:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|