Skip to content

Commit

Permalink
chore: alterado pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
maydersonmellops committed Feb 22, 2024
1 parent fc0f69c commit a72f6c5
Showing 1 changed file with 38 additions and 13 deletions.
51 changes: 38 additions & 13 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,50 @@ name: Create Release
on:
workflow_dispatch:

# jobs:
# build:
# name: 'Create Release'
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: CSchoel/[email protected]
# with:
# version: 0.2.0
# - name: Create Release using GitHub CLI
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: >
# gh release create
# -d
# -F RELEASE.md
# -t "Version $RELEASE_VERSION"
# ${GITHUB_REF#refs/*/}

jobs:
build:
name: 'Create Release'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: CSchoel/[email protected]
with:
version: 0.2.0
- name: Create Release using GitHub CLI
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: >
gh release create
-d
-F RELEASE.md
-t "Version $RELEASE_VERSION"
${GITHUB_REF#refs/*/}
- name: Set env # required to get 'vX.Y.Z' instead of 'refs/tag/vX.Y.Z'
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Extract changelog for release version
run: |
cp RELEASE_HEAD.md RELEASE.md
printf "\n" >> RELEASE.md
sed -e "/^## \\[${RELEASE_VERSION:1}\\]/,/^## / ! d" CHANGELOG.md | head -n -2 >> RELEASE.md
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # provided by Actions
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body_path: RELEASE.md
draft: true
prerelease: false
# jobs:
# build:
# name: Create Release
Expand Down

0 comments on commit a72f6c5

Please sign in to comment.