Skip to content

Commit

Permalink
Merge pull request #43 from contentstack/bugfix/CS-40583
Browse files Browse the repository at this point in the history
bugfix/CS-40583 - Added the old release.yml code with version change for actions
  • Loading branch information
abhinav-from-contentstack authored Aug 29, 2023
2 parents dde6328 + 8f74ed4 commit 6afef10
Show file tree
Hide file tree
Showing 5 changed files with 372 additions and 419 deletions.
62 changes: 19 additions & 43 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,34 @@
name: Release
name: Releases

on:
push:
branches:
- main
branches: [main]

jobs:
build:
name: Build and upload
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/[email protected]
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
node-version: '18.x'
- name: Install dependencies
run: npm install
- name: Build
run: npm run prepack
- name: Upload dist
uses: actions/[email protected]
with:
name: lib
path: lib
node-version: "18.x"
- run: npm install

release:
name: Download dist and release
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: '18.x'
- name: Install dependencies
run: npm install
- name: Download dist
uses: actions/download-artifact@v3
with:
name: lib
path: lib
- name: Display dirs
run: ls -R
- name: get-npm-version
id: package-version
uses: martinbeentjes/[email protected]
- name: install npm packall
run: npm install npm-pack-all

- run: node node_modules/.bin/npm-pack-all
- uses: Klemensas/action-autotag@stable
id: update_tag
with:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
tag_prefix: "v"
- name: github-release
if: steps.update_tag.outputs.tagname
id: github-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create v${{ steps.package-version.outputs.current-version }} --title "Release ${{ steps.package-version.outputs.current-version }}" --generate-notes
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
11 changes: 0 additions & 11 deletions .github/workflows/sast-scan.yml

This file was deleted.

11 changes: 0 additions & 11 deletions .github/workflows/secrets-scan.yml

This file was deleted.

Loading

0 comments on commit 6afef10

Please sign in to comment.