Skip to content

Commit

Permalink
✨ feat: added CI.CD for release new version #3
Browse files Browse the repository at this point in the history
  • Loading branch information
pnguyen215 committed Jan 5, 2024
1 parent 3d59b57 commit c22a81d
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/release.yml
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 }}

0 comments on commit c22a81d

Please sign in to comment.