From 8fe97ac7e2152e3a95e81343b94ab65515cc870a Mon Sep 17 00:00:00 2001 From: Philipp Daun Date: Wed, 26 Jul 2023 11:53:25 +0200 Subject: [PATCH] Update GitHub workflows --- .github/ISSUE_TEMPLATE/issue-template.md | 22 --------------- .github/workflows/npm-publish.yml | 8 +++--- .github/workflows/version-update.yml | 35 ++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 26 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/issue-template.md create mode 100644 .github/workflows/version-update.yml diff --git a/.github/ISSUE_TEMPLATE/issue-template.md b/.github/ISSUE_TEMPLATE/issue-template.md deleted file mode 100644 index 1d81c82..0000000 --- a/.github/ISSUE_TEMPLATE/issue-template.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -name: Issue template -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - -**Describe your issue**: -Describe your issue here... - -**Swup config or any additional relevant code used**: - -```javascript -const swup = Swup(); -``` - -**Before creating this issue, did you think of...**: -- [ ] Have you checked closed issues for similar/related problems. -- [ ] Have you provided all helpful information available? -- [ ] Have you considered creating a demo so we can help you better? diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index b84c8b4..de5aee0 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -10,11 +10,11 @@ jobs: publish-npm: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: - node-version: 12 - registry-url: https://registry.npmjs.org/ + node-version: 16 + registry-url: https://registry.npmjs.org - run: npm ci - run: npm publish --access public env: diff --git a/.github/workflows/version-update.yml b/.github/workflows/version-update.yml new file mode 100644 index 0000000..6b67e54 --- /dev/null +++ b/.github/workflows/version-update.yml @@ -0,0 +1,35 @@ +# This workflow bumps the package.json version and creates a PR + +name: Update package version + +on: + workflow_dispatch: + inputs: + segment: + description: 'Semver segment to update' + required: true + default: 'patch' + type: choice + options: + - minor + - patch + +jobs: + update-version: + name: Update package version + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 16 + - run: echo "Updating ${{ inputs.segment }} version" + - name: Update version + run: npm --no-git-tag-version version ${{ inputs.segment }} + - uses: peter-evans/create-pull-request@v4 + with: + base: 'master' + branch: 'version/automated' + title: 'Update package version (automated)' + commit-message: 'Update package version' + body: 'Automated update to ${{ inputs.segment }} version'