-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into remove_option_shaderscolumn
- Loading branch information
Showing
19 changed files
with
300 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Publish | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.0.x | ||
|
||
- name: Build | ||
run: echo ${{ github.sha }} > Release.txt | ||
- name: Test | ||
run: cat Release.txt | ||
|
||
- name: Build and publish | ||
run: | | ||
architectures=(win-x64 osx-x64 linux-x64 win-arm64 osx-arm64 linux-arm64) | ||
for arch in "${architectures[@]}"; do | ||
dotnet publish src/pg2b3dm -c Release -r "$arch" /p:PublishSingleFile=true | ||
cd src/pg2b3dm/bin/Release/net8.0/"$arch"/publish | ||
zip -r ../../../../../../../pg2b3dm-"$arch".zip * | ||
cd ../../../../../../.. | ||
done | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
Release.txt | ||
pg2b3dm-win-x64.zip | ||
pg2b3dm-win-arm64.zip | ||
pg2b3dm-osx-x64.zip | ||
pg2b3dm-osx-arm64.zip | ||
pg2b3dm-linux-x64.zip | ||
pg2b3dm-linux-arm64.zip | ||
- name: Pack | ||
working-directory: src/pg2b3dm | ||
run: | | ||
dotnet build pg2b3dm.csproj --configuration Release | ||
dotnet pack pg2b3dm.csproj --configuration Release -p:PackAsTool=true --output ./nupkg | ||
- name: Publish to NuGet | ||
working-directory: src/pg2b3dm | ||
env: | ||
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | ||
run: dotnet nuget push ./nupkg/*.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Get tag | ||
id: tag | ||
uses: dawidd6/action-get-tag@v1 | ||
with: | ||
strip_v: true | ||
|
||
- name: Publish to Docker | ||
run: | | ||
docker build ./src --file ./src/Dockerfile --tag geodan/pg2b3dm:latest | ||
docker push geodan/pg2b3dm:latest | ||
docker tag geodan/pg2b3dm:latest geodan/pg2b3dm:${{ steps.tag.outputs.tag }} | ||
docker push geodan/pg2b3dm:${{ steps.tag.outputs.tag }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
FROM mcr.microsoft.com/dotnet/sdk:6.0 as build | ||
FROM mcr.microsoft.com/dotnet/sdk:8.0 as build | ||
WORKDIR /src | ||
COPY . . | ||
RUN dotnet build "pg2b3dm/pg2b3dm.csproj" -c Release | ||
RUN dotnet publish "pg2b3dm/pg2b3dm.csproj" -c Release -o /app | ||
|
||
FROM mcr.microsoft.com/dotnet/runtime:6.0 | ||
FROM mcr.microsoft.com/dotnet/runtime:8.0 | ||
WORKDIR /app | ||
COPY --from=build /app /app/ | ||
ENTRYPOINT ["dotnet", "pg2b3dm.dll"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,4 @@ | ||
# Database tests | ||
|
||
To run these tests, run the Docker database with test table first. | ||
|
||
Build: | ||
|
||
``` | ||
$ docker build -t delaware . | ||
``` | ||
|
||
Run: | ||
|
||
``` | ||
$ docker run -e POSTGRES_PASSWORD=postgres -p 5433:5432 delaware | ||
``` | ||
In these tests, a database is used containing some test data. The database is a PostgreSQL database with PostGIS extension. | ||
The database is run in a Docker container and is managed by testcontainers (https://testcontainers.com/). |
Oops, something went wrong.