Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Break publish-crates-homebrew action #5

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CI

on:
pull_request_target:
branches: [main]

jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version-file: .node-version

- run: npm ci
- run: npm run format:check
- run: npm run lint
- run: npm run test
- run: npm run build

- name: Check that dist/ is correctly generated
run: git diff --quiet HEAD main -- dist
2 changes: 1 addition & 1 deletion dist/publish-crates-homebrew-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -127689,7 +127689,7 @@ _build_crates_standalone__WEBPACK_IMPORTED_MODULE_6__ = (__webpack_async_depende

const artifact = new _actions_artifact__WEBPACK_IMPORTED_MODULE_3__.DefaultArtifactClient();
function setup() {
const liveRun = _actions_core__WEBPACK_IMPORTED_MODULE_2__.getBooleanInput("live-run", { required: true });
const liveRun = _actions_core__WEBPACK_IMPORTED_MODULE_2__.getBooleanInput("dry-run", { required: true });
const version = _actions_core__WEBPACK_IMPORTED_MODULE_2__.getInput("version", { required: true });
const repo = _actions_core__WEBPACK_IMPORTED_MODULE_2__.getInput("repo", { required: true });
const formulae = _actions_core__WEBPACK_IMPORTED_MODULE_2__.getInput("formulae", { required: true });
Expand Down
2 changes: 1 addition & 1 deletion src/publish-crates-debian.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function setup(): Input {
const sshPrivateKey = core.getInput("ssh-private-key", { required: true });
const sshPassphrase = core.getInput("ssh-passphrase", { required: true });
const installationTest = core.getBooleanInput("installation-test", { required: true });
const repo = core.getInput("repo", {required: true});
const repo = core.getInput("repo", { required: true });

return {
liveRun,
Expand Down
2 changes: 1 addition & 1 deletion src/publish-crates-homebrew.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export type Input = {
};

export function setup(): Input {
const liveRun = core.getBooleanInput("live-run", { required: true });
const liveRun = core.getBooleanInput("dry-run", { required: true });
const version = core.getInput("version", { required: true });
const repo = core.getInput("repo", { required: true });
const formulae = core.getInput("formulae", { required: true });
Expand Down
6 changes: 1 addition & 5 deletions src/ssh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ function setupAgent(): NodeJS.ProcessEnv {
return Object.fromEntries([...commands.matchAll(/([A-Z_]+)=([^;]+);/g)].map(m => [m[1], m[2]]));
}

export async function withIdentity(
privateKey: string,
passphrase: string,
fn: (env: NodeJS.ProcessEnv) => void,
) {
export async function withIdentity(privateKey: string, passphrase: string, fn: (env: NodeJS.ProcessEnv) => void) {
const env = setupAgent();
const passphrasePath = "./.ssh_askpass";
await fs.writeFile(passphrasePath, `echo '${passphrase}'`, { mode: fs.constants.S_IRWXU });
Expand Down
Loading