Skip to content

Commit

Permalink
Update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
deanmarcussen committed Aug 29, 2021
1 parent 2161118 commit d5c3c09
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 39 deletions.
29 changes: 14 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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
47 changes: 26 additions & 21 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<Authors>Dean Marcussen</Authors>
<PackageProjectUrl>https://github.com/ThisNetWorks/ThisNetWorks.OrchardCore.GoogleMaps</PackageProjectUrl>
<PackageLicenseExpression>BSD-3-Clause</PackageLicenseExpression>
<VersionSuffix Condition="'$(VersionSuffix)'!='' AND '$(GITHUB_RUN_ID)' != ''">$(VersionSuffix)-$(GITHUB_RUN_ID)</VersionSuffix>
<VersionSuffix>preview</VersionSuffix>
<VersionSuffix Condition="'$(VersionSuffix)'!='' AND '$(BuildNumber)' != ''">$(VersionSuffix)-$(BuildNumber)</VersionSuffix>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>Latest</LangVersion>
<DebugType>portable</DebugType>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

3 changes: 2 additions & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<PropertyGroup>
<PackageTags>googlemaps;orchardcore;</PackageTags>
<VersionPrefix>1.0.0</VersionPrefix>
<VersionSuffix>beta</VersionSuffix>
<VersionSuffix>preview</VersionSuffix>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

<!-- Called after so that the <VersionSuffix> is built after the local ones -->
Expand Down

0 comments on commit d5c3c09

Please sign in to comment.