diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..06a85ca --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/release-npm.yml b/.github/workflows/release-npm.yml new file mode 100644 index 0000000..f212a1e --- /dev/null +++ b/.github/workflows/release-npm.yml @@ -0,0 +1,49 @@ +name: Release (npm) + +on: + push: + tags: + - '*' + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Cache node modules + id: cache + uses: actions/cache@v3 + with: + path: | + ~/.cache + **/node_modules + key: cache-node-modules-${{ hashFiles('yarn.lock') }} + restore-keys: | + cache-node-modules- + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: yarn install + if: steps.cache.outputs.cache-hit != 'true' + shell: bash + run: yarn install --immutable + + - name: Build + shell: bash + run: yarn build + + - name: GIT/NPM config + run: | + echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish + shell: bash + run: npm publish --access public diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..b6b8ab7 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,32 @@ +name: Release + +on: + push: + branches: + - main + paths-ignore: + - 'package.json' + - 'CHANGELOG.md' + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Conventional Changelog Action + id: changelog + uses: TriPSs/conventional-changelog-action@v4 + with: + github-token: ${{ secrets.github_token }} + + - name: Create Release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.github_token }} + with: + tag_name: ${{ steps.changelog.outputs.tag }} + release_name: ${{ steps.changelog.outputs.tag }} + body: ${{ steps.changelog.outputs.clean_changelog }} \ No newline at end of file