Skip to content

Commit

Permalink
fix: use publication-test
Browse files Browse the repository at this point in the history
publication-test makes more sense than installation-test for cargo
publishing.
  • Loading branch information
diogomatsubara committed Jun 19, 2024
1 parent c5cd230 commit 2277039
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release-crates-cargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
unpublished-deps-repos:
type: string
required: false
installation-test:
publication-test:
type: boolean
required: true
default: true
Expand All @@ -39,7 +39,7 @@ on:
unpublished-deps-repos:
type: string
required: false
installation-test:
publication-test:
type: boolean
required: true
default: true
Expand All @@ -57,4 +57,4 @@ jobs:
unpublished-deps-repos: ${{ inputs.unpublished-deps-repos }}
github-token: ${{ secrets.BOT_TOKEN_WORKFLOW }}
crates-io-token: ${{ secrets.CRATES_IO_TOKEN }}
installation-test: ${{ inputs.installation-test }}
publication-test: ${{ inputs.publication-test }}
6 changes: 3 additions & 3 deletions dist/publish-crates-cargo-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -81358,7 +81358,7 @@ function setup() {
const cratesIoToken = _actions_core__WEBPACK_IMPORTED_MODULE_1__.getInput("crates-io-token", { required: true });
const unpublishedDepsPatterns = _actions_core__WEBPACK_IMPORTED_MODULE_1__.getInput("unpublished-deps-patterns");
const unpublishedDepsRepos = _actions_core__WEBPACK_IMPORTED_MODULE_1__.getInput("unpublished-deps-repos");
const installationTest = _actions_core__WEBPACK_IMPORTED_MODULE_1__.getBooleanInput("installation-test", { required: true });
const publicationTest = _actions_core__WEBPACK_IMPORTED_MODULE_1__.getBooleanInput("publication-test", { required: true });
return {
liveRun,
branch,
Expand All @@ -81367,14 +81367,14 @@ function setup() {
unpublishedDepsRegExp: unpublishedDepsPatterns === "" ? /^$/ : new RegExp(unpublishedDepsPatterns.split("\n").join("|")),
unpublishedDepsRepos: unpublishedDepsRepos === "" ? [] : unpublishedDepsRepos.split("\n"),
cratesIoToken,
installationTest,
publicationTest,
};
}
async function main(input) {
let registry = undefined;
try {
registry = await _estuary__WEBPACK_IMPORTED_MODULE_2__/* .spawn */ .C();
if (input.installationTest) {
if (input.publicationTest) {
for (const repo of input.unpublishedDepsRepos) {
await publishToEstuary(input, repo, registry, input.unpublishedDepsRegExp);
}
Expand Down
2 changes: 1 addition & 1 deletion publish-crates-cargo/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ inputs:
required: false
unpublished-deps-repos:
required: false
installation-test:
publication-test:
required: true

runs:
Expand Down
8 changes: 4 additions & 4 deletions src/publish-crates-cargo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export type Input = {
unpublishedDepsRegExp: RegExp;
unpublishedDepsRepos: string[];
cratesIoToken?: string;
installationTest: boolean;
publicationTest: boolean;
};

export function setup(): Input {
Expand All @@ -25,7 +25,7 @@ export function setup(): Input {
const cratesIoToken = core.getInput("crates-io-token", { required: true });
const unpublishedDepsPatterns = core.getInput("unpublished-deps-patterns");
const unpublishedDepsRepos = core.getInput("unpublished-deps-repos");
const installationTest = core.getBooleanInput("installation-test", { required: true });
const publicationTest = core.getBooleanInput("publication-test", { required: true });

return {
liveRun,
Expand All @@ -36,7 +36,7 @@ export function setup(): Input {
unpublishedDepsPatterns === "" ? /^$/ : new RegExp(unpublishedDepsPatterns.split("\n").join("|")),
unpublishedDepsRepos: unpublishedDepsRepos === "" ? [] : unpublishedDepsRepos.split("\n"),
cratesIoToken,
installationTest,
publicationTest,
};
}

Expand All @@ -45,7 +45,7 @@ export async function main(input: Input) {
try {
registry = await estuary.spawn();

if (input.installationTest) {
if (input.publicationTest) {
for (const repo of input.unpublishedDepsRepos) {
await publishToEstuary(input, repo, registry, input.unpublishedDepsRegExp);
}
Expand Down

0 comments on commit 2277039

Please sign in to comment.