diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 000000000..d46b44896
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,38 @@
+name: Build on release
+
+on:
+ push:
+ tags:
+ - 'v*.*.*' # Triggers the workflow on version tags like v1.0.0
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+
+ - name: Extract version from tag
+ id: extract_version
+ run: echo "::set-output name=VERSION::${GITHUB_REF#refs/tags/v}"
+
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v3
+ with:
+ dotnet-version: '6.x' # .NET 6.x SDK supports .NET Standard 2.0
+
+ - name: Restore dependencies
+ run: dotnet restore
+
+ - name: Build project
+ run: dotnet build crypto/src/BouncyCastle.Crypto.csproj --configuration Release --framework netstandard2.0 /p:Version=${{ steps.extract_version.outputs.VERSION }}
+
+ - name: Publish DLL
+ run: dotnet publish crypto/src/BouncyCastle.Crypto.csproj -c Release -f netstandard2.0 -o ./publish /p:Version=${{ steps.extract_version.outputs.VERSION }}
+
+ - name: Upload artifact
+ uses: actions/upload-artifact@v2
+ with:
+ name: Mirror.BouncyCastle.Crypto-dll
+ path: ./publish
diff --git a/BouncyCastle.sln b/BouncyCastle.sln
index 1a47c1fbd..99a706e49 100644
--- a/BouncyCastle.sln
+++ b/BouncyCastle.sln
@@ -10,7 +10,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
LICENSE.md = LICENSE.md
README.md = README.md
signfile.bat = signfile.bat
- version.json = version.json
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BouncyCastle.Crypto", "crypto\src\BouncyCastle.Crypto.csproj", "{25326952-177B-4D34-9448-3024AF0D7B46}"
diff --git a/crypto/src/BouncyCastle.Crypto.csproj b/crypto/src/BouncyCastle.Crypto.csproj
index e770871ef..7e4719a16 100644
--- a/crypto/src/BouncyCastle.Crypto.csproj
+++ b/crypto/src/BouncyCastle.Crypto.csproj
@@ -97,10 +97,6 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
diff --git a/version.json b/version.json
deleted file mode 100644
index 505521e30..000000000
--- a/version.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
- "version": "2.4",
- "assemblyVersion": {
- "precision": "major"
- },
- "versionHeightOffset": -1,
- "nugetPackageVersion": {
- "semVer": 2
- },
- "publicReleaseRefSpec": [
- "^refs/heads/master$",
- "^refs/heads/release/v\\d+\\.\\d+$"
- ],
- "release": {
- "branchName": "release/v{version}",
- "firstUnstableTag": "beta"
- }
-}