Skip to content

Merge pull request #603 from tuanchauict/release/alpha/1.3 #18

Merge pull request #603 from tuanchauict/release/alpha/1.3

Merge pull request #603 from tuanchauict/release/alpha/1.3 #18

name: Publish Production release
on:
workflow_dispatch:
push:
branches:
- release/product
jobs:
build:
uses: ./.github/workflows/shared-build-and-upload-artifact.yml
with:
artifact: production-release-artifact
deploy:
needs: build
runs-on: ubuntu-latest
environment: production
env:
TARGET_RELEASE_REPOSITORY: "https://${{ secrets.TARGET_AUTH_KEY }}@${{ vars.TARGET_RELEASE_REPOSITORY }}"
SRC_GIT_BRANCH: ${{ needs.build.outputs.git-branch }}
SRC_GIT_SHA: ${{ needs.build.outputs.git-sha }}
steps:
- name: Get built artifact
uses: actions/download-artifact@v3
with:
name: production-release-artifact
path: distributions
- name: Fetch current code
run: git clone "${{ env.TARGET_RELEASE_REPOSITORY }}" "working"
- name: Publish release
working-directory: working
run: |
sh tools/release.sh "../distributions" "${{ env.SRC_GIT_BRANCH }}-${{ env.SRC_GIT_SHA }}"