From d5c3c099822fa64a380bdf99b21f199330c2ee14 Mon Sep 17 00:00:00 2001 From: Dean Marcussen Date: Sun, 29 Aug 2021 12:28:59 +0100 Subject: [PATCH] Update actions --- .github/workflows/build.yml | 29 +++++++++++---------- .github/workflows/publish.yml | 47 +++++++++++++++++++---------------- Common.props | 4 +-- README.md | 11 ++++++++ src/Directory.Build.props | 3 ++- 5 files changed, 55 insertions(+), 39 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0f2278d..9be6f65 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,27 +1,26 @@ -name: Build +name: build on: push: - branches: [ master ] + branches: [main] paths-ignore: - - 'docs/**' - - 'readme.md' + - "docs/**" + - "readme.md" pull_request: - branches: [ master ] + branches: [main] jobs: build: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Setup .NET Core - uses: actions/setup-dotnet@v1 - - name: Install dependencies - run: dotnet restore - - name: Build - run: dotnet build --configuration Release --no-restore - - name: Test - run: dotnet test --no-restore + - uses: actions/checkout@v2 + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + - name: Install dependencies + run: dotnet restore + - name: Build + run: dotnet build --configuration Release --no-restore + - name: Test + run: dotnet test --no-restore --no-build diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 77d855d..36ddc1b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,29 +2,34 @@ name: publish on: push: - branches: [ release/1.x ] + tags: + - v* jobs: - build: - + publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Setup .NET Core - uses: actions/setup-dotnet@v1 - - name: Install dependencies - run: dotnet restore - - name: Build - run: dotnet build --configuration Release --no-restore - - name: Test - run: dotnet test --no-restore - - name: Pack with dotnet - run: dotnet pack --output artifacts --configuration Release - - name: Push with dotnet - run: dotnet nuget push artifacts/*.nupkg --api-key ${{ secrets.API_KEY }} --source https://api.nuget.org/v3/index.json - - name: Archive artifacts - uses: actions/upload-artifact@v1 - with: - name: artifacts - path: artifacts + - uses: actions/checkout@v2 + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + - name: Install dependencies + run: dotnet restore + - name: Build + run: dotnet build --configuration Release --no-restore + - name: Test + run: dotnet test --no-restore + - name: Pack + run: | + arrTag=(${GITHUB_REF//\// }) + VERSION="${arrTag[2]}" + VERSION="${VERSION:1}" + echo "VERSION $VERSION" + dotnet pack --output artifacts --configuration Release --no-restore --no-build -p:Version=$VERSION -p:TreatWarningsAsErrors=false + - name: Push with dotnet + run: dotnet nuget push artifacts/*.nupkg --api-key ${{ secrets.API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate + - name: Archive artifacts + uses: actions/upload-artifact@v1 + with: + name: artifacts + path: artifacts diff --git a/Common.props b/Common.props index f392707..9b60fd9 100644 --- a/Common.props +++ b/Common.props @@ -5,9 +5,9 @@ Dean Marcussen https://github.com/ThisNetWorks/ThisNetWorks.OrchardCore.GoogleMaps BSD-3-Clause - $(VersionSuffix)-$(GITHUB_RUN_ID) + preview + $(VersionSuffix)-$(BuildNumber) true - netcoreapp3.1 Latest portable false diff --git a/README.md b/README.md index cd868a1..c98cb21 100644 --- a/README.md +++ b/README.md @@ -55,3 +55,14 @@ You can override these to customise the javascript, and display the map how you - `DisplayMaps` Displays a Google Map with all data from a query, or summary display. No overrides for markers, just override the entire shape and render as required. - `DisplayMapsContainer` Contains the div that the map will mount on. Override to adjust height / width etc. +## Versions + +Version tags and pre release suffixes are based of the version of Orchard Core referenced. + +For version 1.0 of Orchard Core use `1.0.0`, which will use the [Orchard Core NuGet Feed](https://www.nuget.org/packages/OrchardCore/). + +Prerelease versions are suffixed with the CloudSmith build of Orchard Core referenced, +and will required a configured CloudSmith NuGet feed. Refer [Configuring a preview package source](https://docs.orchardcore.net/en/latest/docs/getting-started/preview-package-source/) + +e.g. `1.1.0-preview-16439` refers to the CloudSmith Orchard Core prerelease build `v1.1.0-preview-16439` + diff --git a/src/Directory.Build.props b/src/Directory.Build.props index ac7c16b..7fdc28c 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -3,7 +3,8 @@ googlemaps;orchardcore; 1.0.0 - beta + preview + true