opensnowcat/opensnowcat-enrich

Fix release workflow attachments

AlexITC opened this issue · 2 comments

When executing the release workflow, the jar files must be attached to the github release.

We have tried running this workflow (https://github.com/opensnowcat/opensnowcat-enricher/actions/runs/7487179270/job/20379062445) and got a few warnings saying that the jar files can't be found:

🤔 Pattern 'modules/pubsub/target/scala-2.12/opensnowcat-enrich-pubsub-v0.0.1.jar' does not match any files.
🤔 Pattern 'modules/kinesis/target/scala-2.12/opensnowcat-enrich-kinesis-v0.0.1.jar' does not match any files.
🤔 Pattern 'modules/kafka/target/scala-2.12/opensnowcat-enrich-kafka-v0.0.1.jar' does not match any files.
🤔 Pattern 'modules/nsq/target/scala-2.12/opensnowcat-enrich-nsq-v0.0.1.jar' does not match any files.
🤔 modules/pubsub/target/scala-2.12/opensnowcat-enrich-pubsub-v0.0.1.jar,modules/kinesis/target/scala-2.12/opensnowcat-enrich-kinesis-v0.0.1.jar,modules/kafka/target/scala-2.12/opensnowcat-enrich-kafka-v0.0.1.jar,modules/nsq/target/scala-2.12/opensnowcat-enrich-nsq-v0.0.1.jar not include valid file.

This is likely caused by our partial renames introduced at #5 .

While the workflow succeeded, the github release does not have any jars attached.

I have dig more into this with #7, after fixing problems related to the naming, I got another error:

⬆️ Uploading opensnowcat-enrich-pubsub-0.0.2.jar...
⬆️ Uploading opensnowcat-enrich-kinesis-0.0.2.jar...
⬆️ Uploading opensnowcat-enrich-eventbridge-0.0.2.jar...
⬆️ Uploading opensnowcat-enrich-kafka-0.0.2.jar...
⬆️ Uploading opensnowcat-enrich-nsq-0.0.2.jar...
Error: Failed to upload release asset opensnowcat-enrich-pubsub-0.0.2.jar. received status code 403
Resource not accessible by integration
undefined

Based on https://github.com/softprops/action-gh-release, it is very likely that we are missing this permission in the github token:

permissions:
  contents: write

#7 fixed this.

image