Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .github/workflows/mainnet-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,21 @@ jobs:
if: ${{ inputs.version == 'latest' || startsWith(inputs.version, 'v.') }}

steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
fetch-depth: 0
fetch-tags: true
persist-credentials: false

- name: Find latest tag
if: inputs.version == 'latest'
id: find-latest-tag
run: |
echo "LATEST_TAG=$(git tag -l | sort -V | tail -n1)" >> $GITHUB_OUTPUT

- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
fetch-depth: 0
fetch-tags: true
ref: ${{ inputs.version == 'latest' && steps.find-latest-tag.outputs.LATEST_TAG || inputs.version }}
persist-credentials: false
- name: Checkout selected ref
run: |
git checkout "${{ inputs.version == 'latest' && steps.find-latest-tag.outputs.LATEST_TAG || inputs.version }}"

- name: Setup Node.js
uses: actions/setup-node@v3
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/testnet-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
paths: ['apps/frontend/**', 'packages/**', 'yarn.lock']
types: [opened, reopened, synchronize]

push:
branches:
Expand Down Expand Up @@ -94,11 +95,19 @@ jobs:
echo "🌐 Deployed: https://vevote-dev.vechain.org/" | tee -a "$GITHUB_STEP_SUMMARY"
fi

- name: Create Deployment Comment # only create comment if pull request is opened or reopened or draft
if: github.event.action == 'opened' || github.event.action == 'reopened' || github.event.pull_request.draft == true
- name: Find Comment
uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0
id: find-comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: '🚀 Preview environment deployed!'

- name: Create Deployment Comment
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
with:
issue-number: ${{ github.event.pull_request.number }}
comment-id: ${{ steps.find-comment.outputs.comment-id }}
body: |
# 🚀 Preview environment deployed!
Preview URL: https://preview.vevote-dev.vechain.org${{ steps.process-branch-name.outputs.processedBranchName }}
Expand Down