Skip to content

updated gh workflow

updated gh workflow #7

Workflow file for this run

name: Build
on:
push:
tags:
- "1.*.*"
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Package Source
run: |
tar -czf pcf-trading-stocks-app-${{ env.RELEASE_VERSION }}.tar.gz stocks-api stocks-app db migration
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: pcf-trading-stocks-app-${{ env.RELEASE_VERSION }}
path: pcf-trading-stocks-app-${{ env.RELEASE_VERSION }}.tar.gz
- name: Make Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
name: pcf-trading-stocks-app-${{ env.RELEASE_VERSION }}
files: |
pcf-trading-stocks-app-${{ env.RELEASE_VERSION }}.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}