From 1fd2b3f5aed4256c715498e0cf9e171243f2f038 Mon Sep 17 00:00:00 2001 From: Glenn Watson <5834289+glennawatson@users.noreply.github.com> Date: Wed, 12 Apr 2023 12:07:45 +1000 Subject: [PATCH] housekeeping: Convert to using GitHub actions --- .github/ISSUE_TEMPLATE/bug-report.yml | 102 +++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 8 ++ .github/ISSUE_TEMPLATE/feature_request.md | 37 ++++++ .github/workflows/ci-build.yml | 19 +++ .github/workflows/lock.yml | 31 +++++ .github/workflows/release.yml | 22 ++++ Refit.ruleset | 6 - azure-pipelines.yml | 148 ---------------------- 8 files changed, 219 insertions(+), 154 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug-report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/workflows/ci-build.yml create mode 100644 .github/workflows/lock.yml create mode 100644 .github/workflows/release.yml delete mode 100644 Refit.ruleset delete mode 100644 azure-pipelines.yml diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 000000000..2020d7c52 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,102 @@ +name: Bug Report +description: Create a report to help us improve +title: "[Bug]: " +labels: ["bug"] +body: + - type: markdown + attributes: + value: | + ## Please note although we can't commit to any timeline, priority will be given to those who are [Contributors](https://github.com/reactiveui/ReactiveUI#contribute ) to the project. + - type: textarea + id: description + attributes: + label: Describe the bug 🐞 + description: A clear and concise description of what the bug is. + value: "A bug happened!" + validations: + required: true + - type: textarea + id: reproduce-steps + attributes: + label: Step to reproduce + description: "Steps to reproduce the behavior:" + value: | + 1. Go to '...' + 2. Click on '....' + 3. Scroll down to '....' + 4. See error + validations: + required: true + - type: input + id: reproduce-repository + attributes: + label: Reproduction repository + description: "Simple repository representing the bug" + placeholder: https://github.com/reactiveui/refit + value: | + https://github.com/reactiveui/refit + validations: + required: false + - type: textarea + id: expected-behavior + attributes: + label: Expected behavior + description: A clear and concise description of what you expected to happen. + value: This should happen... + validations: + required: true + - type: textarea + id: screenshots + attributes: + label: Screenshots 🖼️ + description: If applicable, add screenshots to help explain your problem. + validations: + required: false + - type: dropdown + id: ide + attributes: + label: IDE + multiple: true + options: + - Visual Studio 2022 + - Visual Studio 2019 + - Visual Studio 2017 + - Visual Studio for Mac + - Rider Windows + - Rider macOS + - Visual Studio Code + - type: input + id: operating-system + attributes: + label: Operating system + description: Windows, Linux, Mac OS... + validations: + required: false + - type: input + id: system-version + attributes: + label: Version + description: Version and distribution (if applicable) + validations: + required: false + - type: input + id: device + attributes: + label: Device + description: Device e.g. iPhone 6 + validations: + required: false + - type: input + id: refit-version + attributes: + label: Refit Version + description: e.g. 15.1.1 + validations: + required: false + - type: textarea + id: additional-information + attributes: + label: Additional information ℹ️ + description: Add any other information about the problem here. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000..4cf5e0809 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: Questions + url: https://github.com/reactiveui/refit/discussions + about: 'For general questions about Refit, ask in the GitHub discussions' + - name: Chat + url: https://www.reactiveui.net/slack + about: 'Our slack chat community invite' diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 000000000..7290c08c1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,37 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: feature request +assignees: '' + +--- + + + +**Is your feature request related to a problem? Please describe.** + + + + +**Describe the solution you'd like** + + + + +**Describe alternatives you've considered** + + + + +**Describe suggestions on how to achieve the feature** + + + + +**Additional context** + diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml new file mode 100644 index 000000000..5b5165476 --- /dev/null +++ b/.github/workflows/ci-build.yml @@ -0,0 +1,19 @@ +name: Build + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +env: + productNamespacePrefix: "Refit" + +jobs: + build: + uses: reactiveui/actions-common/.github/workflows/workflow-common-setup-and-build.yml@main + with: + configuration: Release + productNamespacePrefix: "Refit" + useVisualStudioPreview: false + useMauiCheckDotNetTool: false diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml new file mode 100644 index 000000000..60daf5654 --- /dev/null +++ b/.github/workflows/lock.yml @@ -0,0 +1,31 @@ +name: 'Lock Threads' + +on: + schedule: + - cron: '0 0 * * *' + workflow_dispatch: + +permissions: + issues: write + pull-requests: write + +concurrency: + group: lock + +jobs: + action: + runs-on: ubuntu-latest + steps: + - uses: dessant/lock-threads@v4 + with: + github-token: ${{ github.token }} + issue-inactive-days: '14' + pr-inactive-days: '14' + issue-comment: > + This issue has been automatically locked since there + has not been any recent activity after it was closed. + Please open a new issue for related bugs. + pr-comment: > + This pull request has been automatically locked since there + has not been any recent activity after it was closed. + Please open a new issue for related bugs. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..ecb2e86e6 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,22 @@ +name: Release + +on: + push: + branches: [ main ] + +env: + productNamespacePrefix: "Refit" + +jobs: + release: + uses: reactiveui/actions-common/.github/workflows/workflow-common-release.yml@main + with: + configuration: Release + productNamespacePrefix: "Refit" + useVisualStudioPreview: false + useMauiCheckDotNetTool: false + secrets: + SIGN_CLIENT_USER_ID: ${{ secrets.SIGN_CLIENT_USER_ID }} + SIGN_CLIENT_SECRET: ${{ secrets.SIGN_CLIENT_SECRET }} + SIGN_CLIENT_CONFIG: ${{ secrets.SIGN_CLIENT_CONFIG }} + NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} diff --git a/Refit.ruleset b/Refit.ruleset deleted file mode 100644 index ca1cf3dd9..000000000 --- a/Refit.ruleset +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 289d87b6f..000000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,148 +0,0 @@ -trigger: - branches: - include: - - main - - rel/* - paths: - exclude: - - '**/*.md' - -pr: - branches: - include: - - main - - rel/* - paths: - exclude: - - '**/*.md' - -variables: - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - -stages: -- stage: Build - jobs: - - job: Build - pool: - vmImage: windows-latest - - variables: - BuildConfiguration: Release - - steps: - - task: UseDotNet@2 - displayName: Use .NET 6.x SDK - inputs: - version: 6.x - performMultiLevelLookup: true - - - task: UseDotNet@2 - displayName: Use .NET Core 5.x Runtime - inputs: - version: 5.0.x - packageType: runtime - performMultiLevelLookup: true - - - task: DotNetCoreCLI@2 - inputs: - command: custom - custom: tool - arguments: install --tool-path . nbgv - displayName: Install NBGV tool - - - pwsh: ./nbgv cloud - displayName: Set Version - - - task: DotNetCoreCLI@2 - inputs: - command: build - projects: Refit/Refit.csproj - arguments: -c $(BuildConfiguration) - displayName: Build - - - task: DotNetCoreCLI@2 - inputs: - command: pack - packagesToPack: Refit/Refit.csproj - configuration: $(BuildConfiguration) - packDirectory: $(Build.ArtifactStagingDirectory)\artifacts - nobuild: true - displayName: Pack Refit - - - task: DotNetCoreCLI@2 - inputs: - command: pack - packagesToPack: '**/Refit.*.csproj;!**/*.Tests.csproj' - configuration: $(BuildConfiguration) - packDirectory: $(Build.ArtifactStagingDirectory)\artifacts - verbosityPack: Minimal - displayName: Pack Extensions - - - task: DotNetCoreCLI@2 - inputs: - command: test - projects: Refit.Tests/Refit.Tests.csproj - arguments: -c $(BuildConfiguration) --settings $(System.DefaultWorkingDirectory)/CodeCoverage.runsettings --collect:"XPlat Code Coverage" -- RunConfiguration.DisableAppDomain=true - displayName: Run Tests - - - task: DotNetCoreCLI@2 - inputs: - command: custom - custom: tool - arguments: install --tool-path . dotnet-reportgenerator-globaltool - displayName: Install ReportGenerator tool - - - script: reportgenerator -reports:$(Agent.TempDirectory)/**/coverage.cobertura.xml -targetdir:$(Build.SourcesDirectory)/coverlet/reports -reporttypes:"Cobertura" - displayName: Create reports - - - task: PublishCodeCoverageResults@1 - displayName: 'Publish code coverage' - inputs: - codeCoverageTool: Cobertura - summaryFileLocation: $(Build.SourcesDirectory)/coverlet/reports/Cobertura.xml - - - publish: $(Build.ArtifactStagingDirectory)\artifacts - displayName: Publish build packages - artifact: BuildPackages - - - publish: config - displayName: Publish signing config - artifact: config - -- stage: CodeSign - condition: and(succeeded('Build'), not(eq(variables['build.reason'], 'PullRequest'))) - jobs: - - deployment: CodeSign - displayName: Code Signing - pool: - vmImage: windows-latest - environment: Code Sign - variables: - - group: SignClient Credentials - strategy: - runOnce: - deploy: - steps: - - task: DotNetCoreCLI@2 - inputs: - command: custom - custom: tool - arguments: install --tool-path . SignClient - displayName: Install SignTool tool - - - pwsh: | - .\SignClient "Sign" ` - --baseDirectory "$(Pipeline.Workspace)\BuildPackages" ` - --input "**/*.nupkg" ` - --config "$(Pipeline.Workspace)\config\signclient.json" ` - --filelist "$(Pipeline.Workspace)\config\filelist.txt" ` - --user "$(SignClientUser)" ` - --secret "$(SignClientSecret)" ` - --name "Refit" ` - --description "Refit" ` - --descriptionUrl "https://github.com/ReactiveUI/refit" - displayName: Sign packages - - - publish: $(Pipeline.Workspace)/BuildPackages - displayName: Publish Signed Packages - artifact: SignedPackages