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 2514a1b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 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 }}
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
6 changes: 3 additions & 3 deletions src/publish-crates-cargo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 2514a1b

Please sign in to comment.