Skip to content

push to main

push to main #8

Workflow file for this run

name: Release next version
on:
workflow_dispatch:
inputs:
release_tag:
description: 'Release Tag'
required: true
type: string
push:
branches: [ "test-release-action" ]
env:
# NEW_VERSION: ${{ github.event.inputs.release_tag }}
NEW_VERSION: 0.0.3
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: test-release-action
fetch-depth: 0
token: ${{ secrets.PROJECT_TOKEN }}
- name: Modify for next release
run: |
chmod +x release.sh
./release.sh ${{ env.NEW_VERSION }}
npm i
git diff
git config user.name '${{ vars.USER_NAME }}'
git config user.email '${{ vars.USER_EMAIL }}'
git add .
git commit -m 'release: clickstream WeChat SDK ${{ env.NEW_VERSION }}'
git push origin main
git tag v${{ env.NEW_VERSION }}
git push origin v${{ env.NEW_VERSION }}
- name: Prepare release file
run: |
npm i
npm run release
- name: Create GitHub release
uses: softprops/action-gh-release@v1
with:
name: "Clickstream WeChat ${{ env.NEW_VERSION }}"
files: |
dist/clickstream-wechat.min.js
dist/clickstream-wechat.min.js.map
tag_name: "v${{ env.NEW_VERSION }}"
prerelease: true
generate_release_notes: true