Skip to content

Commit

Permalink
Further modernization
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoVIII committed Feb 24, 2022
1 parent 404136b commit a52fcf6
Show file tree
Hide file tree
Showing 16 changed files with 226 additions and 505 deletions.
12 changes: 6 additions & 6 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
"paket"
]
},
"fornax": {
"version": "0.13.1",
"fantomas-tool": {
"version": "4.6.5",
"commands": [
"fornax"
"fantomas"
]
},
"fantomas-tool": {
"version": "4.6.0",
"fsdocs-tool": {
"version": "14.0.1",
"commands": [
"fantomas"
"fsdocs"
]
}
}
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Restore tools
run: dotnet tool restore
- name: Restore dependencies
run: dotnet restore
- name: Run build
run: dotnet run --project tests/TypedPersistence.UnitTests/TypedPersistence.UnitTests.fsproj
- name: Build
run: dotnet run build
- name: Run tests
run: dotnet run test
39 changes: 16 additions & 23 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,28 @@
name: Release docs
name: Docs

on:
push:
tags:
- 'v*.*.*'
- '!v*.*.*-*'
- "v*.*.*"
- "!v*.*.*-*"

jobs:
build:
docs:
strategy:
matrix:
os: [ubuntu-latest]
dotnet: [3.1.302]
dotnet: [5.0.404]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Restore tools
run: dotnet tool restore
- name: Restore dependencies
run: dotnet restore
- name: Run Fornax
run: dotnet fsi ./docs.fsx
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.PERSONAL_TOKEN }}
publish_dir: ./docs/_public
publish_branch: gh-pages
force_orphan: true
- name: Checkout code
uses: actions/checkout@v2
- name: Build docs
run: dotnet run build-docs
- name: Deploy docs
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./output
publish_branch: gh-pages
force_orphan: true
34 changes: 21 additions & 13 deletions .github/workflows/publish.yml → .github/workflows/pack.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Publish
name: Pack

on:
push:
tags:
- "v*.*.*"

jobs:
build:
pack:
strategy:
matrix:
os: [ubuntu-latest]
Expand All @@ -17,7 +17,13 @@ jobs:
- name: Get version from tag
id: tag_name
run: |
if [[ ${GITHUB_REF} == *"-"* ]]; then
RTAG=Unreleased
else
RTAG=${GITHUB_REF#refs/tags/v}
fi
echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v}
echo ::set-output name=release_tag::$RTAG
shell: bash
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -27,31 +33,33 @@ jobs:
dotnet-version: ${{ matrix.dotnet }}
- name: Restore tools
run: dotnet tool restore
- name: Run Test
run: dotnet run --project tests/TypedPersistence.UnitTests/TypedPersistence.UnitTests.fsproj
- name: Run build
run: dotnet fsi ./pack.fsx
- name: Pack
run: dotnet run pack ${{ steps.tag_name.outputs.current_version }}
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2.0.0
with:
version: ${{ steps.tag_name.outputs.current_version }}
version: ${{ steps.tag_name.outputs.release_tag }}
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: ${{ steps.changelog_reader.outputs.changes }}
prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }}
draft: ${{ steps.changelog_reader.outputs.status == 'unreleased' }}
prerelease: ${{ steps.changelog_reader.outputs.status == 'unreleased' }}
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v1-release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: out/*.nupkg
tag: ${{ github.ref }}
overwrite: true
file: pack/*.nupkg
file_glob: true
- name: Upload license to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: LICENSE.txt

0 comments on commit a52fcf6

Please sign in to comment.