Skip to content

Commit

Permalink
(#32) Adjust CI builds
Browse files Browse the repository at this point in the history
Add the configuration for building on Team City and GitHub Actions. Also
remove the AppVeyor configuration.
  • Loading branch information
corbob committed Mar 8, 2024
1 parent 71655e6 commit aeee1d0
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 40 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build-module.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Chocolatey-AU Builds

on:
# Trigger on pushes and on pull requests
push:
pull_request:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
# Build on Windows
windows-build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache Tools
uses: actions/[email protected]
with:
path: tools
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}
- name: Build Chocolatey-AU module
run: .\build.ps1 -Task CI -Verbose -ErrorAction Stop
- name: Upload Windows build results
uses: actions/upload-artifact@v3
# Always upload build results
if: ${{ always() }}
with:
name: build-results
path: |
code_drop/**
73 changes: 73 additions & 0 deletions .teamcity/settings.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import jetbrains.buildServer.configs.kotlin.v2019_2.*
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.PullRequests
import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.pullRequests
import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.powerShell
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs

project {
buildType(ChocolateyAU)
}

object ChocolateyAU : BuildType({
id = AbsoluteId("ChocolateyAU")
name = "Build"

artifactRules = """
+:code_drop/**
""".trimIndent()

params {
param("env.vcsroot.branch", "%vcsroot.branch%")
param("env.Git_Branch", "%teamcity.build.vcs.branch.ChocolateyAU_ChocolateyAUVcsRoot%")
param("teamcity.git.fetchAllHeads", "true")
password("env.GITHUB_PAT", "%system.GitHubPAT%", display = ParameterDisplay.HIDDEN, readOnly = true)
}

vcs {
root(DslContext.settingsRoot)

branchFilter = """
+:*
""".trimIndent()
}

steps {
step {
name = "Include Signing Keys"
type = "PrepareSigningEnvironment"
}
powerShell {
name = "Build Module"
formatStderrAsError = true
scriptMode = script {
content = """
try {
& .\build.ps1 -Task CI -Verbose -ErrorAction Stop
}
catch {
${'$'}_ | Out-String | Write-Host -ForegroundColor Red
exit 1
}
""".trimIndent()
}
noProfile = false
param("jetbrains_powershell_script_file", "build.ps1")
}
}

triggers {
vcs {
branchFilter = ""
}
}

features {
pullRequests {
provider = github {
authType = token {
token = "%system.GitHubPAT%"
}
}
}
}
})
40 changes: 0 additions & 40 deletions appveyor.yml

This file was deleted.

0 comments on commit aeee1d0

Please sign in to comment.