Merge pull request #71 from mtrogman/renameAppCmds #28
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: | |
- main | |
workflow_dispatch: | |
jobs: | |
create-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set Git User Identity | |
env: | |
GH_EMAIL: ${{ secrets.GH_EMAIL }} | |
GH_USER: ${{ secrets.GH_USER }} | |
run: | | |
git config --global user.email "$GH_EMAIL" | |
git config --global user.name "$GH_USER" | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Get Version from VERSION File | |
id: get_version | |
run: | | |
VERSION=$(cat VERSION) | |
echo "::set-output name=version::$VERSION" | |
- name: Create Git Tag | |
run: | | |
TAG_NAME="${{ steps.get_version.outputs.version }}" | |
git tag -a $TAG_NAME -m "Release $TAG_NAME" | |
git push origin $TAG_NAME | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.get_version.outputs.version }} | |
release_name: Release ${{ steps.get_version.outputs.version }} | |
body: | | |
Release ${{ steps.get_version.outputs.version }} | |
draft: false | |
prerelease: false | |
- name: Trigger Docker Workflow | |
if: success() # You can adjust this condition based on your needs | |
run: | | |
curl -XPOST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "Accept: application/vnd.github.everest-preview+json" \ | |
https://api.github.com/repos/${{ github.repository }}/dispatches \ | |
--data '{"event_type": "trigger-docker-workflow"}' |