From 6aab5b032cfbd3261259e68e35113b5fbd4620e8 Mon Sep 17 00:00:00 2001 From: Simon Milfred Date: Tue, 16 Jan 2024 11:16:51 +0100 Subject: [PATCH] feat: added release-please and fixed hydration error --- .github/workflows/release-package.yml | 43 -------------------------- .github/workflows/release-please.yml | 44 +++++++++++++++++++++++++++ components/FetchForm.vue | 5 ++- release-please-config.yml | 13 ++++++++ 4 files changed, 61 insertions(+), 44 deletions(-) delete mode 100644 .github/workflows/release-package.yml create mode 100644 .github/workflows/release-please.yml create mode 100644 release-please-config.yml diff --git a/.github/workflows/release-package.yml b/.github/workflows/release-package.yml deleted file mode 100644 index 3b54f1d..0000000 --- a/.github/workflows/release-package.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Release Package - -on: - release: - types: [created] - -jobs: - build: - runs-on: ubuntu-latest - permissions: - contents: read - packages: read - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 16.18 - registry-url: 'https://npm.pkg.github.com' - - run: npm install - env: - NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} - - run: npm ci - - run: npm test - - publish-gpr: - needs: build - runs-on: ubuntu-latest - permissions: - packages: write - contents: read - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 16.18 - registry-url: https://npm.pkg.github.com/ - - run: npm install - env: - NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} - - run: npm ci - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..c917537 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,44 @@ +name: Release Please and Publish + +on: + push: + branches: + - main + +permissions: + contents: write + pull-requests: write + packages: write + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v4 + id: release + with: + token: ${{ secrets.GITHUB_TOKEN }} + release-type: node + # The logic below handles the package building: + - uses: actions/checkout@v4 + if: ${{ steps.release.outputs.release_created }} + - uses: actions/setup-node@v4 + with: + node-version: 18.18 + registry-url: 'https://npm.pkg.github.com' + if: ${{ steps.release.outputs.release_created }} + - run: npm install + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + if: ${{ steps.release.outputs.release_created }} + - run: npm ci + if: ${{ steps.release.outputs.release_created }} + - run: npm test + if: ${{ steps.release.outputs.release_created }} + # The logic below handles the package building: + - run: npm ci + if: ${{ steps.release.outputs.release_created }} + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + if: ${{ steps.release.outputs.release_created }} diff --git a/components/FetchForm.vue b/components/FetchForm.vue index 55e0268..9d81d4a 100644 --- a/components/FetchForm.vue +++ b/components/FetchForm.vue @@ -17,7 +17,10 @@ const originalAttrs = useAttrs(); const props = defineProps({ action: String, - enctype: String, + enctype: { + type: String, + default: 'application/x-www-form-urlencoded', + }, method: String, // The options to pass to the fetch call diff --git a/release-please-config.yml b/release-please-config.yml new file mode 100644 index 0000000..d1b4f20 --- /dev/null +++ b/release-please-config.yml @@ -0,0 +1,13 @@ +{ + "packages": { + ".": { + "changelog-path": "CHANGELOG.md", + "release-type": "node", + "bump-minor-pre-major": false, + "bump-patch-for-minor-pre-major": false, + "draft": false, + "prerelease": false + } + }, + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" +}