Skip to content

Commit

Permalink
chore(release): run release after a successfull CI flow and add prove…
Browse files Browse the repository at this point in the history
…nance
  • Loading branch information
marcalexiei committed Oct 27, 2024
1 parent ecf1382 commit 3508675
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/dry-peas-brake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'eslint-plugin-react-import': patch
---

add provenance to published releases
24 changes: 21 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
name: Release

on:
push:
branches:
- main
workflow_run:
workflows: [CI]
types: [completed]
branches: [main]

concurrency: ${{ github.workflow }}-${{ github.ref }}

permissions:
contents: write
pull-requests: write
id-token: write # added for provenance

env:
HUSKY: 0

jobs:
release:
name: Release
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest

steps:
Expand All @@ -31,3 +41,11 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.CHANGESET_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true

on-ci-fail:
name: "Failure"
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: echo 'CI failed. Release won't be executed'

0 comments on commit 3508675

Please sign in to comment.