diff --git a/.github/workflows/mega-linter.yml b/.github/workflows/mega-linter.yml index d73f7d4..fa92e75 100644 --- a/.github/workflows/mega-linter.yml +++ b/.github/workflows/mega-linter.yml @@ -28,6 +28,7 @@ jobs: contents: write issues: write pull-requests: write + actions: write steps: - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 @@ -154,4 +155,3 @@ jobs: }} commit_message: "[MegaLinter] Apply linters fixes" commit_user_name: megalinter-bot - commit_user_email: nicolas.vuillamy@ox.security diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bb4f2a9..ce28136 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,6 +14,12 @@ jobs: release: runs-on: ubuntu-latest + outputs: + release_created: ${{ steps.release.outputs.release_created }} + release_version: ${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }} + release_tag: ${{ steps.release.outputs.tag_name }} + release_sha256: ${{ steps.npm_publish.outputs.sha256 }} + steps: - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 with: @@ -51,7 +57,35 @@ jobs: release-type: node - name: Publish to NPM - run: yarn publish + id: npm_publish if: ${{ steps.release.outputs.release_created }} + run: | + yarn pack + # shellcheck disable=SC2086 + echo "sha256=$(shasum -a 256 action-docs-*.tgz | cut -d ' ' -f 1)" >> $GITHUB_ENV + yarn publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + homebrew: + if: ${{ needs.release.outputs.release_created }} + name: "Bump Homebrew formula" + runs-on: ubuntu-latest + needs: release + steps: + - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + with: + egress-policy: audit + - uses: npalm/bump-homebrew-formula-action@c03eb3e9122887190a202b7dc42edba8031ed0f9 + with: + # A PR will be sent to github.com/Homebrew/homebrew-core to update this formula + formula-name: action-docs + formula-path: Formula/a/action-docs.rb + tag-name: ${{ needs.release.outputs.release_tag }} + download-url: https://registry.npmjs.org/action-docs/-/action-docs-${{ needs.release.outputs.release_version }}.tgz + download-sha256: ${{ needs.release.outputs.release_sha256 }} + commit-message: | + Bump action-docs to v${{ needs.release.outputs.release_version }} + For more information see: https://github.com/npalm/action-docs/releases/tag/${{ needs.release.outputs.release_tag }} + env: + COMMITTER_TOKEN: ${{ secrets.HOMEBREW_GITHUB_TOKEN }} diff --git a/.mega-linter.yml b/.mega-linter.yml index e784210..1ca41f4 100644 --- a/.mega-linter.yml +++ b/.mega-linter.yml @@ -32,6 +32,11 @@ DISABLE_LINTERS: - COPYPASTE_JSCPD - JAVASCRIPT_ES +DISABLE_ERRORS_LINTERS: + - SPELL_LYCHEE + - SPELL_PROSELINT + - SPELL_CSPELL + JSON_JSONLINT_FILTER_REGEX_EXCLUDE: (tsconfig.json) SPELL_LYCHEE_FILTER_REGEX_EXCLUDE: (CHANGELOG.md) diff --git a/README.md b/README.md index b7b3fc8..00f0b6f 100644 --- a/README.md +++ b/README.md @@ -30,10 +30,23 @@ Optionally you can also add the following section to generate a usage guide, rep ``` -### Generate docs via CLI +### Install + +#### npm ```bash npm install -g action-docs +``` + +#### brew + +```bash +brew install action-docs +``` + +### Generate docs via CLI + +```bash cd # write docs to console