Skip to content

Commit

Permalink
Merge pull request #34 from 108yen/chore/readme
Browse files Browse the repository at this point in the history
Update `RAEADME.md` and action name
  • Loading branch information
108yen authored Oct 4, 2024
2 parents ade4796 + 03fdc43 commit b819819
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/tender-bees-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"changeset-release": patch
---

Change action name.
45 changes: 40 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# 108yen/changeset-release

This action extracts the process of creating a release to github from [`Changesets Release Action`](https://github.com/changesets/action).
This allows for release whenever you want.

Expand All @@ -10,6 +12,7 @@ This allows for release whenever you want.
### Example workflow

This is an example of a release workflow that works when a PR issued by [`Changesets Release Action`](https://github.com/changesets/action) is merged.
The [`Changesets Release Action`](https://github.com/changesets/action) must be configured to work in a separate workflow.

```yml
name: Release
Expand All @@ -36,13 +39,45 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Release
run: 108yen/changeset-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
### Example of using output
```yml
name: Release

on:
pull_request_target:
types:
- closed
branches:
- main

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

jobs:
release:
name: release

permissions:
contents: write

if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'changeset-release/main')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Create release
- name: Release
id: release
run: 108yen/changeset-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Display Tag
run: echo '${{ steps.release.outputs.tag }}'
```
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Changeset-release"
name: "Changeset Release"
description: "A Github action for creating non-public releases with changesets"

branding:
Expand Down

0 comments on commit b819819

Please sign in to comment.