feat(workflow): auto release test #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Release | |
on: | |
push: | |
branches: | |
- feat/release-workflow | |
jobs: | |
create-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install jq | |
run: sudo apt-get install jq -y | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: npm | |
cache-dependency-path: ./package.json | |
- run: npm install | |
- name: Read version from composer.json | |
id: read_version | |
run: | | |
VERSION=$(jq -r '.version' composer.json) | |
echo "version=$VERSION" >> $GITHUB_ENV | |
- name: Create GitHub Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release create ${{ env.version }} --notes "Release ${{ env.version }}" |