docs: remove unused files from being shown (#104) #107
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: Merge Main | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
prepare: | |
name: Calculate Version and Build Number | |
runs-on: ubuntu-22.04 | |
outputs: | |
build_number: ${{ steps.build_number.outputs.value }} | |
new_release: ${{ steps.semantic.outputs.new_release_published }} | |
release: ${{ steps.semantic.outputs.new_release_version }} | |
release_notes: ${{ steps.semantic.outputs.new_release_notes }} | |
version: ${{ steps.version.outputs.value }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.ACCESS_TOKEN }} | |
- uses: cycjimmy/semantic-release-action@v3 | |
id: semantic | |
env: | |
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
with: | |
dry_run: true | |
- name: Count number or releases for tag | |
id: build_number | |
run: echo "value=$(($(git tag | grep -c ${{ steps.semantic.outputs.new_release_version }}) + 1))" >> $GITHUB_OUTPUT | |
- name: Compute version | |
id: version | |
run: echo "value=${{ steps.semantic.outputs.new_release_version }}.rc${{ steps.build_number.outputs.value }}" >> $GITHUB_OUTPUT | |
releases: | |
if: needs.prepare.outputs.new_release == 'true' | |
name: Generates Prerelease | |
runs-on: ubuntu-22.04 | |
needs: | |
- prepare | |
steps: | |
- name: Create Pre Release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
with: | |
tag_name: ${{ needs.prepare.outputs.version }} | |
release_name: ${{ needs.prepare.outputs.version }} | |
body: ${{ github.event.head_commit.message }} | |
prerelease: true | |
- name: Delete Previous drafts | |
uses: hugo19941994/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
- name: Create Draft Release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
with: | |
tag_name: ${{ needs.prepare.outputs.release }} | |
release_name: ${{ needs.prepare.outputs.release }} | |
body: ${{ needs.prepare.outputs.release_notes }} | |
draft: true |