Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite in C# #22

Merged
merged 33 commits into from
Mar 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
a976697
Init C# program
prplecake Mar 2, 2023
4637fcd
Add ConfigManager and related config objects
prplecake Mar 2, 2023
eb8a3ee
Init bookmarking services
prplecake Mar 2, 2023
db591ad
Remove Go
prplecake Mar 2, 2023
ce0d801
Add dotnet CI workflow
prplecake Mar 2, 2023
0e2af4c
Resolve CodeFactor errors and cleanup code
prplecake Mar 3, 2023
9a20b8e
Add basic tests
prplecake Mar 3, 2023
3aed8ee
Update JetBrains project settings
prplecake Mar 3, 2023
708bd4c
Resolve nullability warnings
prplecake Mar 3, 2023
5c3767c
Stub out BookmarkingService base and Pinboard class
prplecake Mar 27, 2023
dab7010
Refactor Program.cs
prplecake Mar 27, 2023
7ad6e34
Refactor ConfigManager.App
prplecake Mar 27, 2023
9970e82
Add run configuration
prplecake Mar 27, 2023
113340a
Update PinboardBookmarkingService
prplecake Mar 27, 2023
bd7299e
Update Account, add constructor
prplecake Mar 27, 2023
67157f1
Stub out required Mastodon API methods
prplecake Mar 27, 2023
6908fd2
Remove PinboardBookmark and related tests
prplecake Mar 27, 2023
acbb73c
Add HtmlUtilities to sanitize HTML
prplecake Mar 27, 2023
1feda2f
Finish up PinboardBookmarkingService, Mastodon.ApiClient, and Bookmar…
prplecake Mar 27, 2023
1c7e5ba
Ignore private or direct messages
prplecake Mar 27, 2023
6ccb2c6
Change executable name
prplecake Mar 27, 2023
1487264
Fix project file
prplecake Mar 27, 2023
3003d60
Reflection doesn't work with single-file executables
prplecake Mar 27, 2023
028d9c7
Fix logging to console in single file executable
prplecake Mar 27, 2023
c6a7933
Reorganize solution
prplecake Mar 29, 2023
0355d2f
Log when stopping host
prplecake Mar 29, 2023
986ea11
Resolve ReSharper warnings
prplecake Mar 29, 2023
7b12b63
Add HtmlUtilitiesTests
prplecake Mar 29, 2023
ee8b0aa
Update dependencies
prplecake Mar 29, 2023
5d0b950
Update README
prplecake Mar 29, 2023
4fa175a
Update workflows
prplecake Mar 29, 2023
cc1b13e
Don't include debug symbols in Releases
prplecake Mar 29, 2023
3bc617c
Bump version to 2.0.0
prplecake Mar 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 0 additions & 71 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

64 changes: 64 additions & 0 deletions .github/workflows/dotnet-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: .NET Release

on:
release:
types: [published]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Restore dependencies
run: |
dotnet nuget add source --username prplecake --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/CompostInTraining/index.json"
dotnet restore
- name: Build
run: dotnet build --no-restore

- name: Test
run: dotnet test --no-build --verbosity normal --logger "trx" --results-directory "./TestResults"

- uses: dorny/test-reporter@v1
if: always()
with:
name: .NET Test Results
path: TestResults/*.trx
reporter: dotnet-trx

publish:
env:
ZipFile: mastodon-bookmark-sync-${{ github.ref_name }}.zip
strategy:
matrix:
rid: [ linux-x64, win-x64, osx-x64 ]

runs-on: ubuntu-latest
name: publish-${{matrix.rid}}
needs: build
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Add NuGet source
run: dotnet nuget add source --username prplecake --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/CompostInTraining/index.json"
- name: Publish CLI (${{matrix.rid}})
run: |
dotnet publish BookmarkSync.CLI/BookmarkSync.CLI.csproj -c Release -r ${{matrix.rid}} --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true
zip mastodon-bookmark-sync-${{ github.ref_name }}-${{matrix.rid}}.zip BookmarkSync.CLI/bin/Release/net7.0/${{matrix.rid}}/publish/*
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: mastodon-bookmark-sync-*.zip
51 changes: 51 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: .NET

on:
push:
branches: [ master ]
paths-ignore:
- 'README.md'
- '.gitignore'
- 'appsettings.Example.json'
- '.github/**'
- '.idea/**'
pull_request:
branches: [ master ]
paths-ignore:
- 'README.md'
- '.gitignore'
- 'appsettings.Example.json'
- '.github/**'
- '.idea/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Restore dependencies
run: |
dotnet nuget add source --username prplecake --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/CompostInTraining/index.json"
dotnet restore
- name: Build
run: dotnet build --no-restore

- name: Test
run: dotnet test --no-build --verbosity normal --logger "trx" --results-directory "./TestResults"

- uses: dorny/test-reporter@v1
if: always()
with:
name: .NET Test Results
path: TestResults/*.trx
reporter: dotnet-trx
25 changes: 0 additions & 25 deletions .github/workflows/go.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/release.yml

This file was deleted.

Loading