wrangler-action/.github/workflows/release.yml
2023-08-30 17:27:17 -05:00

48 lines
1.1 KiB
YAML

name: Release
on:
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
if: ${{ github.repository_owner == 'cloudflare' }}
name: Release
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
pull-requests: write
issues: read
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "latest"
cache: "npm"
- name: Install modules
run: npm ci
- name: Create Version PR
id: changesets
uses: changesets/action@v1
with:
createGithubReleases: true
publish: npx changeset tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Tag & Release Action
if: steps.changesets.outputs.published == 'true'
with:
tag_name: v${{ fromJSON(steps.changesets.outputs.publishedPackages)[0].version }}
uses: JasonEtco/build-and-tag-action@v2
env:
GITHUB_TOKEN: ${{ github.token }}