File tree Expand file tree Collapse file tree 3 files changed +60
-33
lines changed Expand file tree Collapse file tree 3 files changed +60
-33
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ name : Publish
2
+ on :
3
+ workflow_run :
4
+ workflows : [CI]
5
+ branches : [main]
6
+ types : [completed]
7
+
8
+ concurrency : ${{ github.workflow }}-${{ github.ref }}
9
+
10
+ permissions :
11
+ contents : write
12
+
13
+ jobs :
14
+ publish :
15
+ if : ${{ github.event.workflow_run.conclusion == 'success' }}
16
+ runs-on : ubuntu-latest
17
+ steps :
18
+ - uses : actions/checkout@v4
19
+ - uses : pnpm/action-setup@v4
20
+ - uses : actions/setup-node@v4
21
+ with :
22
+ node-version-file : " .nvmrc"
23
+ registry-url : " https://registry.npmjs.org"
24
+ cache : " pnpm"
25
+
26
+ - name : Install dependencies
27
+ run : pnpm install --frozen-lockfile
28
+
29
+ - name : " Build"
30
+ run : pnpm run build
31
+
32
+ - name : Publish
33
+ run : pnpm publish
34
+ env :
35
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
36
+
37
+ - name : Extract version
38
+ id : extractVersion
39
+ run : |
40
+ version=$(grep '"version"' package.json | sed -E 's/.*"version": "(.*)".*/\1/')
41
+ echo "version=$version" >> $GITHUB_OUTPUT
42
+
43
+ - name : Create tag
44
+ uses : actions/github-script@v5
45
+ with :
46
+ github-token : ${{ secrets.GITHUB_TOKEN }}
47
+ script : |
48
+ github.rest.git.createRef({
49
+ owner: context.repo.owner,
50
+ repo: context.repo.repo,
51
+ sha: context.sha,
52
+ ref: 'refs/tags/v${{ steps.extractVersion.outputs.version }}'
53
+ })
54
+
55
+ - name : Create release
56
+ uses : softprops/action-gh-release@v2
57
+ with :
58
+ tag_name : v${{ steps.extractVersion.outputs.version }}
59
+ generate_release_notes : true
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " email-viewer" ,
3
- "version" : " 1.0.0 " ,
3
+ "version" : " 1.0.1 " ,
4
4
"license" : " MIT" ,
5
5
"author" : " OreQr" ,
6
6
"description" : " 📧Opens browser with email preview" ,
You can’t perform that action at this time.
0 commit comments