Skip to content

Merge pull request #82 from iranpsc/fix/logicBugs3 #220

Merge pull request #82 from iranpsc/fix/logicBugs3

Merge pull request #82 from iranpsc/fix/logicBugs3 #220

Workflow file for this run

name: Auto release
on:
push:
branches:
- main
permissions:
contents: write
packages: write
pull-requests: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "16.x"
- name: Install dependencies
run: npm install
- name: Configure Git user
run: |
git config --global user.name "parsa"
git config --global user.email "parsabr80@gmail.com"
- name: Bump version using standard-version
run: npx standard-version
- name: Push changes
run: git push --follow-tags origin main
- name: Build the project
run: npm run build
- name: Zip dist folder
run: |
zip -r $GITHUB_WORKSPACE/output.zip dist/
echo "output.zip created"
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Generate tag name from package.json
id: generate_tag
run: |
VERSION=$(jq -r ".version" package.json)
echo "TAG_NAME=v$VERSION" >> $GITHUB_ENV
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.TAG_NAME }}
release_name: "Release ${{ env.TAG_NAME }}"
body: ${{ github.event.head_commit.message }}
draft: false
prerelease: false