digineo / texd

texd wraps TeX in a web API
MIT License
8 stars 1 forks source link

Actions: skip "Create Github release" job when dispatching from "Rebuild release images" #27

Open dmke opened 2 years ago

dmke commented 2 years ago

Goreleaser will fail to create a Github release for a given Git tag, if the release already exist.

This currently happens on a monthly schedule (Workflow definition), although it shouldn't:

await github.rest.actions.createWorkflowDispatch({
  owner:       context.repo.owner,
  repo:        context.repo.repo,
  workflow_id: 'release.yml',
  ref:         releaseTag,
  inputs: {
    goreleaser:  'false',
    releaseType: 'release',
  }
})
console.log(`triggered release for ${releaseTag} (${releaseRef})`)

goreleaser: 'false' should inhibit creating Github releases.

The latest Workflow log contains:

triggered release for v0.4.1 (fa1c31bae6ead1c665b5534fc05eb52768c74920)
dmke commented 3 months ago

That wasn't it...

dmke commented 3 months ago

It seems like github.rest.repos.getLatestRelease only looks at GitHub releases, not the Git tags :thinking: