This repository has been archived by the owner on Nov 22, 2024. It is now read-only.
Bump svelte from 3.59.2 to 4.2.19 #21
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Suggest auto-releasing | |
on: | |
pull_request: | |
branches: | |
- main | |
types: | |
- opened | |
paths: | |
- 'attractions/package.json' | |
jobs: | |
tag-issue: | |
name: Tag the PR with [new release] if needed | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v4 | |
- name: Add the [new release] tag 🔖 | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const package = require(`${process.env.GITHUB_WORKSPACE}/attractions/package.json`); | |
const currentVersion = `v${package.version}`; | |
const tags = (await github.repos.listTags({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
})).data; | |
if (tags.find(tag => tag.name === currentVersion) == null) { | |
await github.issues.addLabels({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: context.issue.number, | |
labels: ['new release'], | |
}); | |
await github.issues.createComment({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: context.issue.number, | |
body: ( | |
'This pull request will automatically trigger a release on merge!\n' | |
+ 'If it shouldn\'t, remove the [new release] label.' | |
), | |
}); | |
} |