Skip to content

Commit 6afef10

Browse files
Merge pull request #43 from contentstack/bugfix/CS-40583
bugfix/CS-40583 - Added the old release.yml code with version change for actions
2 parents dde6328 + 8f74ed4 commit 6afef10

File tree

5 files changed

+372
-419
lines changed

5 files changed

+372
-419
lines changed

.github/workflows/release.yml

Lines changed: 19 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,34 @@
1-
name: Release
1+
name: Releases
2+
23
on:
34
push:
4-
branches:
5-
- main
5+
branches: [main]
6+
67
jobs:
78
build:
8-
name: Build and upload
99
runs-on: ubuntu-latest
1010
steps:
11-
- name: Checkout
12-
uses: actions/[email protected]
13-
with:
14-
fetch-depth: 0
15-
- name: Setup Node.js
16-
uses: actions/[email protected]
11+
- uses: actions/[email protected]
12+
- uses: actions/[email protected]
1713
with:
18-
node-version: '18.x'
19-
- name: Install dependencies
20-
run: npm install
21-
- name: Build
22-
run: npm run prepack
23-
- name: Upload dist
24-
uses: actions/[email protected]
25-
with:
26-
name: lib
27-
path: lib
14+
node-version: "18.x"
15+
- run: npm install
2816

29-
release:
30-
name: Download dist and release
31-
runs-on: ubuntu-latest
32-
needs: build
33-
steps:
34-
- name: Checkout
35-
uses: actions/[email protected]
36-
with:
37-
fetch-depth: 0
38-
- name: Setup Node.js
39-
uses: actions/[email protected]
40-
with:
41-
node-version: '18.x'
42-
- name: Install dependencies
43-
run: npm install
44-
- name: Download dist
45-
uses: actions/download-artifact@v3
46-
with:
47-
name: lib
48-
path: lib
49-
- name: Display dirs
50-
run: ls -R
5117
- name: get-npm-version
5218
id: package-version
5319
uses: martinbeentjes/[email protected]
20+
- name: install npm packall
21+
run: npm install npm-pack-all
22+
23+
- run: node node_modules/.bin/npm-pack-all
24+
- uses: Klemensas/action-autotag@stable
25+
id: update_tag
26+
with:
27+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
28+
tag_prefix: "v"
5429
- name: github-release
30+
if: steps.update_tag.outputs.tagname
5531
id: github-release
5632
env:
5733
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58-
run: gh release create v${{ steps.package-version.outputs.current-version }} --title "Release ${{ steps.package-version.outputs.current-version }}" --generate-notes
34+
run: gh release create v${{ steps.package-version.outputs.current-version }} --title "Release ${{ steps.package-version.outputs.current-version }}" --generate-notes ./contentstack-cli-cm-regex-validate-${{ steps.package-version.outputs.current-version }}.tgz

.github/workflows/sast-scan.yml

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

.github/workflows/secrets-scan.yml

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

0 commit comments

Comments
 (0)