Skip to content

Commit

Permalink
add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ElderJames committed Jun 28, 2024
1 parent cb1aff7 commit f94d4fc
Show file tree
Hide file tree
Showing 4 changed files with 156 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: ant-design-blazor # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # ant-design-blazor # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ['https://yangshunjie.com/images/qrcode/alipay.jpg','https://yangshunjie.com/images/qrcode/wepay.jpg'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
53 changes: 53 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Publish Package

env:
Version: 0.1.0
NUGET_API_KEY: ${{secrets.NUGET_API_KEY}}

on:
push:
branches:
- master

jobs:
publish-and-deploy:
runs-on: ubuntu-latest
if: github.repository_owner == 'ant-design-blazor'

steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
with:
persist-credentials: false

- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.100

- uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.101

- uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.100

- uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.100

- uses: actions/setup-node@v1
with:
node-version: '10.x'

- name: Package Nightly Nuget 📦
run: |
npm i
SUFFIX=`date "+%y%m%d%H%M%S"`
dotnet build
dotnet pack src/AntDesign.Icons/AntDesign.Icons.csproj /p:PackageVersion=$Version-nightly-${SUFFIX} -c Release -o publish
- name: Publish to Nuget ✔
run: |
dotnet nuget push publish/*.nupkg -s https://api.nuget.org/v3/index.json -k $NUGET_API_KEY --skip-duplicate
39 changes: 39 additions & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Pull Request Checks

on:
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.100

- uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.101

- uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.100

- uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.100

- uses: actions/setup-node@v1
with:
node-version: '10.x'

- name: Check Building ⚙
run: |
npm i
dotnet build
52 changes: 52 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Release

env:
NUGET_API_KEY: ${{secrets.NUGET_API_KEY}}

on:
push:
tags:
- '*'

jobs:
release-and-publish-package:
runs-on: ubuntu-latest
if: github.repository_owner == 'ant-design-blazor'

steps:
- uses: actions/checkout@v2

- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.300

- uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.100

- uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.101

- uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.100

- uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.100

- uses: actions/setup-node@v1
with:
node-version: '10.x'

- name: Package and publish to Nuget📦
run: |
VERSION=`git describe --tags`
echo "Publishing Version: ${VERSION}"
npm install
dotnet build
rm -rf ./node_modules
dotnet pack src/AntDesign.Icons/AntDesign.Icons.csproj /p:PackageVersion=$VERSION -c Release -o publish
dotnet nuget push publish/*.nupkg -s https://api.nuget.org/v3/index.json -k $NUGET_API_KEY --skip-duplicate

0 comments on commit f94d4fc

Please sign in to comment.