-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ feat: added CI.CD for release new version #3
- Loading branch information
1 parent
3d59b57
commit c22a81d
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: resume.latex workflow | ||
|
||
on: | ||
push: | ||
branches: ["master"] | ||
tags: | ||
- "v*" | ||
pull_request: | ||
branches: ["master"] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install dependencies | ||
run: | | ||
echo "(Build) Installations or dependencies here" | ||
- name: Run tests | ||
run: | | ||
echo "Test commands here" | ||
deploy: | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | ||
needs: build | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Check if tag exists | ||
id: check_tag | ||
run: | | ||
if [ -n "$GITHUB_REF" ]; then | ||
TAG=${GITHUB_REF#refs/tags/} | ||
# echo "::set-output name=tag::$TAG" | ||
echo "TAG=${TAG}" >> $GITHUB_ENV | ||
else | ||
# echo "::set-output name=tag::" | ||
echo "TAG=" >> $GITHUB_ENV | ||
fi | ||
shell: bash | ||
|
||
- name: Install dependencies | ||
run: | | ||
echo "(Deploy) Installations or dependencies here" | ||
- name: Create GitHub Release | ||
id: create_release | ||
uses: softprops/action-gh-release@v1 | ||
# uses: actions/create-release@v1 | ||
with: | ||
# tag_name: ${{ steps.check_tag.outputs.tag }} | ||
tag_name: ${{ env.TAG }} | ||
body: | | ||
:gem: released new version ${{ env.TAG }} | ||
draft: false | ||
prerelease: false | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |