wrangler-action/.github/workflows/release.yml

53 lines
1.2 KiB
YAML
Raw Permalink Normal View History

2023-08-08 23:59:44 +02:00
name: Release
on:
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
2023-08-08 23:59:44 +02:00
jobs:
release:
if: ${{ github.repository_owner == 'cloudflare' }}
name: Release
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
pull-requests: write
issues: read
2023-08-08 23:59:44 +02:00
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
2023-08-10 23:46:29 +02:00
publish: npx changeset tag
2023-08-08 23:59:44 +02:00
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2023-08-31 17:21:30 +02:00
- name: Build action
if: steps.changesets.outputs.published == 'true'
2023-08-31 17:21:30 +02:00
run: npm run build
- name: Push dist-tags
if: steps.changesets.outputs.published == 'true'
uses: JasonEtco/build-and-tag-action@v2
with:
tag_name: v${{ fromJSON(steps.changesets.outputs.publishedPackages)[0].version }}
env:
GITHUB_TOKEN: ${{ github.token }}