mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-05 23:53:21 +00:00
Migrate to gh actions (#89)
* intial go at building the windows pipeline in GH * fixing whitespace issue * moving version info script * changing the electron-builder commands to the npm scripts * fixing the PACKAGE_VERSION var * adding debugging statements * changing list command * fixing PACKAGE_VERSION var * adding linux job and disabling windows job * debugging linux installs * retrying the rpm * re-enabling the windows build * re-enabling publishing of the exe * debugging pkg fetched * debugging this more * testing install of pkg-fetch with npm * moving pkg-fetch installation * trying to manually add the fetched package * I was wrong. This wasn't linux. Switching to pwsh * fixing the pwsh var syntax * removing debugging tasks and re-enabling the other build tasks * adding build_and_signing. Removing the non-cli executables from the build pipeline and disabling it for testing. * removing some whitespace * switching how we get package version * adding custom signing script * removing deubbing code and getting ready for PR * adding in another release gate * chaning file name to fit previous standards * removing appveyor pipeline file * moving all of the build tasks to the same build file * changing GITHUB_TOKEN because GITHUB_* is probably reserved * adding release pipeline and moving all realease tasks to that pipeline * updating the package.json's to contain the releases to my repo * fixing the RELEASE_TAG_NAME and switching the electron builder from pack to publish * fixing the npm run publish command * adding GH_TOKEN to the build and sign task * fixing upload path * removing the release asset upload since I think they are already published? * removing testing code * testing tweak to github release * making sure I've got the right repo set * removing whitespace * adding in clone task to setup * removing the stop-gap * adding GH_TOKEN to the linux publish task * fixing string * switching to manual publishing. There seems to be a bug in the electron-builder publishing? or our setup * switching back to electron-builder publishing but manually creating and pushing the tag * I don't know why electron-builder isn't picking up the release. Adding some debugging code * adding in GH token for release checking * adding another GH token for release checking * commenting out the tagging portion. This should just happen automatically... * trying the release without the manual uploads? * adding -d flag to release edit * disabling the gui build to see if the cli changes the tag * trying out a fix * testing the upload release asset action * fixing typo * trying RELEASE_NAME * fixing bash error * trying something else for the release name * changing all of the release asset uploads to a provided action * Removing some debugging code * re-enabling the windows and linux jobs * changing the content type of the checksum files * fixing typo * removing the PKG_INFO flag * installing RH with choco * testing the reshack * reenabling the correct job * resetting release workflow and adding exp workflow * trying ResourceHacker.exe * switching to pwsh to see if that works * switching back and specifying cmd shell * finding the bin to add to the path * wrestling with cmd * debugging path * giving up on nice printing * changing to different path debugging * adding RH to the path * trying something else * trying something else * maybe the path resets? * updating exp workflow to try to get reshack to work * trying to add to the path without the quotes * fixing the RH test * debugging path * setting path forever * not playing around with perfect environment paths with windows.... * preivous test was inconclusive * testing RH * changing the npm command and removing unnecssary GITHUB_TOKEN * removing the exp workflow * quoting the signing file * debugging VER_INFO * debugging the pkg-fetch * disabling non-cli jobs * changing value of WIN_PKG * testing more pkg-fetch * changing the paths to the home directory * renaming exp workflow * trying a string * trying it from the home directory * removing the stop gap * updating the version to something that RH supports * initial release test * fixing GITHUB_TOKEN * changing the version to a real version * debugging tag names * changing the trigger on the exp workflow * moving the disabled job to the correct workflow * trying wet spaghetti * updating case statement * adding in the findings from the experiment * removing testing code. Leaving unfinished macos build disabled * removing the prod environment secrets * setting up the mac build job * renaming the key name * moving the signing file * working on the mac packaging * removing desktop mac certs * disabling the non-mac jobs * setting up the build workflow for first run * adding manual trigger to the build workflow * disabling the push trigger * removing the non-existant setup function * removing the unneeded certs * removing increment version since we are not submitting to the Apple Store. * re-enabling the APPLE_ID vars * updating how the package version is retrieved in build. staging release workflow for testing * fixing the asset upload updating the repo in package.json * adding debugging to dist * adding in missing directory for debugging * renaming that file * updating the build/release workflows * fixing the setup output * updating file name and changing dist to publish * adding in the missing token * changing the zip name * add debuggin * fixing debugging step * removing debugging task. Not needed * reworking the content type of the mac release assets * removing the rename task and adding in some debugging * flipping the order of the dmg and the mac.zip upload to see if it is a problem with the release asset upload * adding the renaming back in * switching the upload name back to dashes * commenting out the manual release asset upload. Looks like publish is doing that? * removing all debugging code * updating README with the GitHub Actions Badge * changing all of the slashes to match * removing unneeded package version setting * removing unneeded package version setup * adding WIN_PKG task back in. accidentally removed it
This commit is contained in:
33
scripts/make-versioninfo.ps1
Normal file
33
scripts/make-versioninfo.ps1
Normal file
@@ -0,0 +1,33 @@
|
||||
$major,$minor,$patch = $env:PACKAGE_VERSION.split('.')
|
||||
|
||||
$versionInfo = @"
|
||||
|
||||
1 VERSIONINFO
|
||||
FILEVERSION $major,$minor,$patch,0
|
||||
PRODUCTVERSION $major,$minor,$patch,0
|
||||
FILEOS 0x40004
|
||||
FILETYPE 0x1
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
BLOCK "040904b0"
|
||||
{
|
||||
VALUE "CompanyName", "Bitwarden Inc."
|
||||
VALUE "ProductName", "Bitwarden"
|
||||
VALUE "FileDescription", "Bitwarden Directory Connector CLI"
|
||||
VALUE "FileVersion", "$env:PACKAGE_VERSION"
|
||||
VALUE "ProductVersion", "$env:PACKAGE_VERSION"
|
||||
VALUE "OriginalFilename", "bwdc.exe"
|
||||
VALUE "InternalName", "bwdc"
|
||||
VALUE "LegalCopyright", "Copyright Bitwarden Inc."
|
||||
}
|
||||
}
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
{
|
||||
VALUE "Translation", 0x0409 0x04B0
|
||||
}
|
||||
}
|
||||
"@
|
||||
|
||||
$versionInfo | Out-File ./version-info.rc
|
||||
23
scripts/sign.js
Normal file
23
scripts/sign.js
Normal file
@@ -0,0 +1,23 @@
|
||||
exports.default = async function(configuration) {
|
||||
if (
|
||||
parseInt(process.env.ELECTRON_BUILDER_SIGN) === 1 &&
|
||||
configuration.path.slice(-4) == ".exe"
|
||||
) {
|
||||
console.log(`[*] Signing file: ${configuration.path}`)
|
||||
require("child_process").execSync(
|
||||
`azuresigntool sign ` +
|
||||
`-kvu ${process.env.SIGNING_VAULT_URL} ` +
|
||||
`-kvi ${process.env.SIGNING_CLIENT_ID} ` +
|
||||
`-kvt ${process.env.SIGNING_TENANT_ID} ` +
|
||||
`-kvs ${process.env.SIGNING_CLIENT_SECRET} ` +
|
||||
`-kvc ${process.env.SIGNING_CERT_NAME} ` +
|
||||
`-fd ${configuration.hash} ` +
|
||||
`-du ${configuration.site} ` +
|
||||
`-tr http://timestamp.digicert.com ` +
|
||||
`"${configuration.path}"`,
|
||||
{
|
||||
stdio: "inherit"
|
||||
}
|
||||
);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user