Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 962 Bytes

writing-gh-actions.md

File metadata and controls

35 lines (25 loc) · 962 Bytes

GitHub Actions / Best practices for writing actions

Stringify objects when using core.* utilities to output logs

Objects are expected to be supported sooner or later.

GOOD

try {
  await run();
} catch (err) {
  core.setFailed(err.toString());
}

// => ::error::HttpError: Not Found

BAD

try {
  await run();
} catch (err) {
  core.setFailed(err);
}

// => UnhandledPromiseRejectionWarning: TypeError: (s || "").replace is not a function

Use actions-tagger to automatically update major version tags

GitHub recommends to use semantic versioning and update the major version tag to the latest release. This action automates that: