Skip to content

Merge pull request #12 from reload/dependabot/github_actions/DavidAns… #15

Merge pull request #12 from reload/dependabot/github_actions/DavidAns…

Merge pull request #12 from reload/dependabot/github_actions/DavidAns… #15

Workflow file for this run

---
name: Release
on:
push:
branches:
- main
permissions:
actions: read
contents: write
jobs:
release:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Bump version and push tag
uses: anothrNick/[email protected]
id: version
env:
GITHUB_TOKEN: ${{ github.token }}
WITH_V: true
DEFAULT_BUMP: patch
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
RELEASE_BRANCHES: main
- name: Create release
uses: actions/github-script@v7
if: ${{ steps.version.outputs.new_tag }}
env:
RELEASE_TAG: ${{ steps.version.outputs.new_tag }}
with:
script: |
try {
await github.rest.repos.createRelease({
draft: false,
generate_release_notes: true,
name: process.env.RELEASE_TAG,
owner: context.repo.owner,
prerelease: false,
repo: context.repo.repo,
tag_name: process.env.RELEASE_TAG,
});
} catch (error) {
core.setFailed(error.message);
}