Skip to content

Commit fad2abb

Browse files
committed
ci: release workflow fix
1 parent 92e1e90 commit fad2abb

3 files changed

Lines changed: 49 additions & 81 deletions

File tree

.github/workflows/publish-release.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 49 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,52 @@ name: Release
22
on:
33
push:
44
branches:
5-
- main
6-
7-
jobs:
8-
release:
9-
runs-on: ubuntu-latest
10-
steps:
11-
- name: Checkout
12-
uses: actions/checkout@v3
13-
14-
- name: Setup
15-
uses: ./.github/actions/setup
16-
17-
- uses: JS-DevTools/npm-publish@v3
18-
with:
19-
token: ${{ secrets.NPM_TOKEN }}
20-
access: public
5+
- master
6+
paths-ignore:
7+
- '.github/**/*.yml'
8+
- '.gitignore'
9+
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v3
13+
14+
- name: Setup
15+
uses: ./.github/actions/setup
16+
17+
- name: Prepare env
18+
run: echo "previous_tag=$(git describe --tags --abbrev=0 2>/dev/null || echo '')" >> $GITHUB_ENV
19+
20+
- name: Create Tag
21+
id: create_tag
22+
uses: jaywcjlove/create-tag-action@main
23+
if: env.previous_tag
24+
with:
25+
package-path: ./package.json
26+
27+
- name: Generate Changelog
28+
id: changelog
29+
uses: jaywcjlove/changelog-generator@main
30+
if: steps.create_tag.outputs.successful == 'true'
31+
with:
32+
head-ref: ${{steps.create_tag.outputs.version}}
33+
filter: (^[\s]+?[R|r]elease)|(^[R|r]elease)
34+
35+
- name: Create Release
36+
uses: jaywcjlove/create-tag-action@main
37+
id: release
38+
if: steps.create_tag.outputs.successful == 'true'
39+
with:
40+
version: ${{steps.create_tag.outputs.version}}
41+
release: true
42+
body: |
43+
```bash
44+
yarn add react-native-file-viewer-turbo@${{steps.create_tag.outputs.versionNumber}}
45+
```
46+
47+
${{ steps.changelog.outputs.compareurl }}
48+
${{ steps.changelog.outputs.changelog }}
49+
50+
- uses: JS-DevTools/npm-publish@v3
51+
with:
52+
token: ${{ secrets.NPM_TOKEN }}
53+
access: public

.github/workflows/tag.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)