File tree Expand file tree Collapse file tree 1 file changed +30
-1
lines changed
Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Original file line number Diff line number Diff line change 55 pull_request :
66 workflow_dispatch :
77
8- # Permissions needed to push to gh-pages
8+ # Permissions needed to push to gh-pages and create releases
99permissions :
1010 contents : write
1111 pages : write
7979 cd ..
8080 npm test
8181
82+ release :
83+ needs : [openapi-client-generation, test]
84+ if : github.ref == 'refs/heads/main'
85+ runs-on : ubuntu-latest
86+ steps :
87+ - uses : actions/checkout@v4
88+ with :
89+ fetch-depth : 0
90+
91+ - name : Set up Node.js
92+ uses : actions/setup-node@v4
93+ with :
94+ node-version : ' 20.x'
95+ cache : ' npm'
96+
97+ - name : Install dependencies
98+ run : npm ci
99+
100+ - name : Configure Git
101+ run : |
102+ git config --global user.name "GitHub Actions"
103+ git config --global user.email "[email protected] " 104+
105+ - name : Release
106+ env :
107+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
108+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
109+ run : npm run release
110+
82111 docs :
83112 runs-on : ubuntu-latest
84113 permissions :
You can’t perform that action at this time.
0 commit comments