From fd3060e0a5c3ea3a9a81c17e4e78da5549ce77fc Mon Sep 17 00:00:00 2001 From: gdlcf88 Date: Sun, 30 Jun 2024 12:38:23 +0800 Subject: [PATCH] Change version to 1.0.0-preview.1 --- .github/workflows/publish-docs.yml | 50 +++++++++++++++++ .github/workflows/publish.yml | 86 ++++++++++++++++++++++++++++++ common.props | 4 +- docs/README.md | 2 +- 4 files changed, 139 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/publish-docs.yml create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml new file mode 100644 index 0000000..ae496fc --- /dev/null +++ b/.github/workflows/publish-docs.yml @@ -0,0 +1,50 @@ +name: publish to easyabp.io +on: + push: + branches: + - master + - main +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + persist-credentials: false + fetch-depth: 0 + + - name: Find and Replace + uses: jacobtomlinson/gha-find-replace@master + with: + find: \]\((/docs/) + replace: "](/modules/${{ github.event.repository.name }}/" + include: docs/**.md + + - name: Pull repo and change files + id: change + run: | + ls + git clone https://github.com/EasyAbp/easyabp.github.io + cd easyabp.github.io + rm -rf docs/modules/${{ github.event.repository.name }} + rm -rf docs/.vuepress/public/modules/${{ github.event.repository.name }} + cp -rf ../docs/ docs/modules/${{ github.event.repository.name }} + cp -rf ../docs/ docs/.vuepress/public/modules/${{ github.event.repository.name }} + git add --all + echo "##[set-output name=diff;]$(git diff --staged)" + - name: Commit files + if: steps.change.outputs.diff + run: | + ls + cd easyabp.github.io + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git commit -m "Update the docs of ${{ github.event.repository.name }}" -a + - name: Push changes + if: steps.change.outputs.diff + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.EASYABP_IO_ACCESS_TOKEN }} + repository: EasyAbp/easyabp.github.io + directory: easyabp.github.io diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..0b7d1c1 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,86 @@ +name: publish to nuget +on: + push: + branches: + - master + - main +jobs: + publish: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - uses: NuGet/setup-nuget@v1 + - uses: actions/setup-dotnet@v3 + with: + dotnet-version: '8.0.x' + + - name: read common.props + id: commonProps + uses: juliangruber/read-file-action@v1 + with: + path: ./common.props + + - name: get version + id: getVersion + uses: AsasInnab/regex-action@v1 + with: + regex_pattern: '(?<=>)[^<>]+(?=)' + regex_flags: 'gim' + search_string: '${{ steps.commonProps.outputs.content }}' + + - name: dotnet restore + run: dotnet restore -s "https://api.nuget.org/v3/index.json" + + - name: dotnet build + run: dotnet build -c Release + + # - name: dotnet test + # run: dotnet test -c Release --no-restore --no-build + + - name: dotnet pack + run: dotnet pack -c Release --no-build --property PackageOutputPath=${{ github.workspace }}/nugetPackages/ + + - name: remove unused packages + run: | + cd ${{ github.workspace }}/nugetPackages + shopt -s extglob + rm -f !(EasyAbp.*) + rm -f !(*.${{ steps.getVersion.outputs.first_match }}.nupkg) + rm -f *.Blazor.Host.* + rm -f *.Blazor.Server.Host.* + rm -f *.Host.Shared.* + rm -f *.HttpApi.Host.* + rm -f *.IdentityServer.* + rm -f *.AuthServer.* + rm -f *.Web.Host.* + rm -f *.Web.Unified.* + rm -f *.HttpApi.Client.ConsoleTestApp.* + rm -f *.Tests.* + rm -f *.TestBase.* + ls + + - name: dotnet nuget push to GitHub + uses: tanaka-takayoshi/nuget-publish-to-github-packages-action@v2.1 + with: + nupkg-path: '${{ github.workspace }}/nugetPackages/*.nupkg' + repo-owner: 'EasyAbp' + gh-user: 'EasyAbp' + token: ${{ secrets.GITHUB_TOKEN }} + + - name: dotnet nuget push to NuGet + run: dotnet nuget push ${{ github.workspace }}/nugetPackages/*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate + + - name: determine if the tag exists + uses: mukunku/tag-exists-action@v1.0.0 + id: checkTag + with: + tag: ${{ steps.getVersion.outputs.first_match }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: add git tag + if: ${{ steps.checkTag.outputs.exists == 'false' }} + uses: tvdias/github-tagger@v0.0.1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ steps.getVersion.outputs.first_match }} diff --git a/common.props b/common.props index b5500cd..39a1dd9 100644 --- a/common.props +++ b/common.props @@ -1,12 +1,12 @@ latest - 0.1.0 + 1.0.0-preview.1 $(NoWarn);CS1591;CS0436 module true EasyAbp Team - An ABP module that helps to define business processes and trace their progress. + An ABP module that helps define and track business processes. https://avatars3.githubusercontent.com/u/58311641?s=128 https://github.com/EasyAbp/ProcessManagement https://github.com/EasyAbp/ProcessManagement diff --git a/docs/README.md b/docs/README.md index 8539767..a2f352d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,2 +1,2 @@ # ProcessManagement -An ABP module that helps to define business processes and trace their progress. +An ABP module that helps define and track business processes.