Skip to content

Commit

Permalink
release(0.2.1): Merge to master
Browse files Browse the repository at this point in the history
release(0.2.1): Merge to master
  • Loading branch information
MatehElismar authored Jul 22, 2024
2 parents 02a02b8 + e0ff4a6 commit e62664d
Show file tree
Hide file tree
Showing 10 changed files with 556 additions and 36 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @tagshelfsrl/llvm
46 changes: 46 additions & 0 deletions .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: "Nuget"

on:
workflow_call:
inputs:
name:
required: false
type: string
push:
default: false
required: false
type: boolean
version:
required: false
type: string
default: v0.0.0-ci
host:
required: false
type: string
secrets:
token:
required: false
nuget:
required: false

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set VERSION variable from tag
run: |
TAG=${{ inputs.version }}
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- name: Build
run: dotnet build --configuration Release /p:Version=${VERSION}
- name: Test
run: dotnet test --configuration Release /p:Version=${VERSION} --no-build
- name: Pack
if: inputs.push
run: dotnet pack --configuration Release /p:Version=${VERSION} --no-build --output .
- name: Push
if: inputs.push
run: dotnet nuget push ${{inputs.name}}.${VERSION}.nupkg -k ${{secrets.nuget}} -s ${{ inputs.host }}
15 changes: 15 additions & 0 deletions .github/workflows/on-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "On PR"

on:
pull_request:
branches:
- master
- development

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
uses: ./.github/workflows/nuget.yml
22 changes: 22 additions & 0 deletions .github/workflows/on-push-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "On Push/Merge"

on:
push:
branches:
- master
- development

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
uses: ./.github/workflows/nuget.yml

release:
needs: [build]
uses: ./.github/workflows/semver.yml
secrets:
token: ${{secrets.PAT_TOKEN}}

17 changes: 17 additions & 0 deletions .github/workflows/on-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "On Tag Pushed"

on:
push:
tags:
- v*

jobs:
build:
uses: ./.github/workflows/nuget.yml
secrets:
nuget: ${{secrets.NUGET_TOKEN}}
with:
name: TagShelf.Alfred.ApiWrapper
host: https://api.nuget.org/v3/index.json
push: true
version: ${{github.ref_name}}
34 changes: 34 additions & 0 deletions .github/workflows/semver.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "SemVer"

on:
workflow_call:
inputs:
nodeVersion:
type: string
default: 20
secrets:
token:
required: false

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.nodeVersion }}
- name: Install dependencies
run: npm install -g semantic-release @semantic-release/github @semantic-release/git @semantic-release/changelog
- name: Release
run: npx semantic-release
env:
CI: true
GH_TOKEN: ${{ secrets.token == '' && secrets.GITHUB_TOKEN || secrets.token }}
GITHUB_TOKEN: ${{ secrets.token == '' && secrets.GITHUB_TOKEN || secrets.token }}
11 changes: 11 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"branches": [
{name: 'master'}
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/git",
"@semantic-release/github"
]
}
3 changes: 2 additions & 1 deletion AlfredApiWrapper/AlfredApiWrapper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>disable</Nullable>
<PackageId>TagShelf.Alfred.ApiWrapper</PackageId>
<Version>0.2.0</Version>
<Version>0.2.1</Version>
<Authors>Raúl Roa ([email protected])</Authors>
<Company>Tagshelf</Company>
<Description>A comprehensive .NET library designed to facilitate seamless interactions with the Alfred API.</Description>
<PackageTags>Alfred;API;Wrapper;.NET</PackageTags>
<RepositoryUrl>https://github.com/tagshelfsrl/dotnet-alfred-api-wrapper</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReleaseNotes>Introducing AccountDomain with webhook setup support. See https://github.com/tagshelfsrl/dotnet-alfred-api-wrapper/releases for more details.</PackageReleaseNotes>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion AlfredApiWrapperTestApp/AlfredApiWrapperTestApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TagShelf.Alfred.ApiWrapper" Version="0.2.0" />
<PackageReference Include="TagShelf.Alfred.ApiWrapper" Version="[0.2.0,)" />
</ItemGroup>

</Project>
Loading

0 comments on commit e62664d

Please sign in to comment.