Skip to content

Commit

Permalink
Merge branch 'dev' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
Noggog committed Aug 12, 2023
2 parents 434c45a + 4592d33 commit 4ad6246
Show file tree
Hide file tree
Showing 349 changed files with 5,844 additions and 5,283 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/DeployMkDocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: DeployMkDocs

# Controls when the action will run.
on:
# Triggers the workflow on push on the master branch
push:
branches:
- dev
paths:
- 'docs/**'
- 'mkdocs.yml'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Branch
uses: actions/checkout@v2

# Deploy MkDocs
- name: Deploy MkDocs
# You may pin to the exact commit or the version.
# uses: mhausenblas/mkdocs-deploy-gh-pages@66340182cb2a1a63f8a3783e3e2146b7d151a0bb
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
REQUIREMENTS: ./docs/requirements.txt
32 changes: 20 additions & 12 deletions .github/workflows/ci-dev.yml → .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
name: Dev
name: Build

on:
push:
branches: [ dev ]
branches:
- dev
- release
- prerelease
paths-ignore:
- 'docs/**'
- 'mkdocs.yml'
pull_request:
branches: [ dev ]
branches:
- dev
- release
- prerelease
paths-ignore:
- 'docs/**'
- 'mkdocs.yml'

jobs:
build:

build-test:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
Expand All @@ -25,18 +36,15 @@ jobs:
sln: Mutagen.Records.sln
- os: windows-latest
sln: Mutagen.Records.Linux.sln

steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.*
- name: Install dependencies
run: |
dotnet clean ${{ matrix.sln }} -c Release && dotnet nuget locals all --clear
dotnet restore ${{ matrix.sln }}
- name: Build
run: dotnet build ${{ matrix.sln }} -c Release --no-restore
run: dotnet build ${{ matrix.sln }} -c Release --no-restore /p:GeneratePackageOnBuild=false
- name: Test
run: dotnet test ${{ matrix.sln }} -c Release --no-build

42 changes: 0 additions & 42 deletions .github/workflows/ci-linux.yml

This file was deleted.

126 changes: 126 additions & 0 deletions .github/workflows/ci-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: Publish

on:
schedule:
- cron: '40 9 * * *'
workflow_dispatch:
release:
types: [published]
inputs:
is_release_event:
description: Should this be a release or a preview package
required: true
default: 'false'

jobs:
activity-short-circuit:
runs-on: ubuntu-latest
outputs:
same_sha: ${{ steps.check.outputs.same_sha }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Get Activity Short Circuit
id: check
run: |
echo "Event name: ${{ github.event_name }}"
git branch -a
git fetch origin nightly:nightly
head_sha=$(git rev-parse --verify HEAD)
nightly_sha=$(git rev-parse --verify nightly)
if [[ "$head_sha" == "$nightly_sha" && ${{ github.event_name }} != "release" ]]; then
same_sha=true;
else
same_sha=false;
fi
echo "head_sha=$head_sha"
echo "nightly_sha=$nightly_sha"
echo "same_sha=${same_sha}"
echo "same_sha=${same_sha}" >> $GITHUB_OUTPUT
build-test:
needs: activity-short-circuit
if: needs.activity-short-circuit.outputs.same_sha == 'false'
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
sln:
- Mutagen.Records.sln
- Mutagen.Records.Linux.sln
exclude:
- os: ubuntu-latest
sln: Mutagen.Records.sln
- os: macos-latest
sln: Mutagen.Records.sln
- os: windows-latest
sln: Mutagen.Records.Linux.sln

steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
dotnet clean ${{ matrix.sln }} -c Release && dotnet nuget locals all --clear
dotnet restore ${{ matrix.sln }}
- name: Build
run: dotnet build ${{ matrix.sln }} -c Release --no-restore
- name: Test
run: dotnet test ${{ matrix.sln }} -c Release --no-build

build-test-push:
needs: [build-test, activity-short-circuit]
if: needs.activity-short-circuit.outputs.same_sha == 'false'
runs-on: windows-latest
steps:
- name: Get timestamp
uses: 1466587594/get-current-time@v1
id: current-time
with:
format: YYYYMMDD-HHmmSS
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install dependencies
run: |
dotnet clean Mutagen.Records.sln -c Release && dotnet nuget locals all --clear
dotnet restore Mutagen.Records.sln
- name: Build
run: dotnet build Mutagen.Records.sln -c Release --no-restore /p:GeneratePackageOnBuild=false
- name: Pack Preview
if: ${{ success() && github.event.release.prerelease }}
run: |
dotnet pack Mutagen.Records.sln -c Release --no-build --no-restore -o out --version-suffix "nightly-${{ steps.current-time.outputs.formattedTime }}"
- name: Pack Release
if: ${{ success() && !github.event.release.prerelease }}
run: |
dotnet pack Mutagen.Records.sln -c Release --no-build --no-restore -o out
- name: Publish to Github
uses: svenstaro/upload-release-action@v2
if: ${{ success() && github.event.inputs.is_release_event == 'true' && github.ref == 'refs/heads/release' }}
with:
file: "**/*.nupkg"
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.release.tag_name }}
file_glob: "true"
- name: Publish to Nuget.org
run: dotnet nuget push **/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --no-symbols

update-nightly:
needs: [build-test-push, activity-short-circuit]
if: needs.activity-short-circuit.outputs.same_sha == 'false'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Reset nightly to release
run: |
head_sha=$(git rev-parse --verify HEAD)
echo "head_sha=$head_sha"
git checkout nightly
git reset --hard $head_sha
git push
42 changes: 0 additions & 42 deletions .github/workflows/ci-release.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/publish.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/toc.yml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/wiki-copy.yml

This file was deleted.

Loading

0 comments on commit 4ad6246

Please sign in to comment.