Merge pull request #819 from Sysvale/fix/release-workflow-secret #583
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: "Releaser ✔️" | |
on: | |
push: | |
branches: | |
- main | |
- v2.70-legacy | |
jobs: | |
build: | |
name: Create Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- name: Install conventional-changelog-cli | |
run: npm install -g [email protected] | |
- name: Generate changelog | |
run: | | |
conventional-changelog -p angular -i CHANGELOG.md -s --release-count 1 --verbose | |
echo "CHANGELOG<<EOF" >> $GITHUB_ENV | |
cat CHANGELOG.md >> $GITHUB_ENV | |
echo "EOF" >> $GITHUB_ENV | |
- name: Creates tag | |
uses: Klemensas/action-autotag@stable | |
id: auto-tag | |
with: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_SECRET }} | |
tag_prefix: "v" | |
- name: Read package.json | |
uses: tyankatsu0105/read-package-version-actions@v1 | |
id: package-version | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_SECRET }} | |
with: | |
tag_name: ${{ steps.auto-tag.outputs.tagname }} | |
release_name: "v${{ steps.package-version.outputs.version }}" | |
body: | | |
## Mudanças nessa release: | |
${{ env.CHANGELOG }} | |
draft: false | |
prerelease: false |