Compare commits
8 Commits
v0.7.0-alp
...
v0.7.0-alp
| Author | SHA1 | Date | |
|---|---|---|---|
|
f2c4e73b8c
|
|||
|
e82cdfd00f
|
|||
|
7643662fcc
|
|||
|
5c56d77a23
|
|||
|
eaae9b7487
|
|||
|
f012025917
|
|||
|
ac65cd683a
|
|||
|
e689e3efd8
|
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
RUNNER_TOOL_CACHE: /toolcache
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -26,7 +28,17 @@ jobs:
|
||||
corepack enable
|
||||
corepack prepare yarn@stable --activate
|
||||
|
||||
- name: Cache node_modules
|
||||
id: cache-node-modules
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-modules-
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Create env file
|
||||
@@ -43,14 +55,16 @@ jobs:
|
||||
GITEA_URL: ${{ vars.GT_URL }}
|
||||
|
||||
- name: Trigger Ansible Deploy Playbook
|
||||
uses: https://github.com/distributhor/workflow-webhook@v3
|
||||
with:
|
||||
webhook_url: ${{ vars.WEBHOOK_URL }}
|
||||
webhook_auth_type: bearer
|
||||
webhook_auth: Token:${{ secrets.WEBHOOK_SECRET }}
|
||||
verbose: true
|
||||
data: >
|
||||
{
|
||||
"artifact_url":
|
||||
"${{ gitea.server_url }}/${{ gitea.repository }}/releases/download/v${{ steps.build.outputs.VERSION }}/release-${{ steps.build.outputs.VERSION }}.tar.gz"
|
||||
}
|
||||
if: steps.build.outputs.VERSION != ''
|
||||
run: |
|
||||
response=$(curl -sS \
|
||||
-H "Authorization: Bearer ${{ secrets.WEBHOOK_SECRET }}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"artifact_url":"${{ gitea.server_url }}/${{ gitea.repository }}/releases/download/v${{ steps.build.outputs.VERSION }}/release-${{ steps.build.outputs.VERSION }}.tar.gz"}' \
|
||||
-w "\n%{http_code}" \
|
||||
"${{ vars.WEBHOOK_URL }}")
|
||||
http_code=$(echo "$response" | tail -1)
|
||||
body=$(echo "$response" | head -n -1)
|
||||
echo "Response: $body"
|
||||
echo "HTTP status: $http_code"
|
||||
[ "$http_code" -ge 200 ] && [ "$http_code" -lt 300 ]
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"@semantic-release/exec",
|
||||
{
|
||||
"prepareCmd": "node generate-version.cjs '${nextRelease.version}' && yarn install --immutable && yarn generate",
|
||||
"publishCmd": "tar -czvf release-${nextRelease.version}.tar.gz -C .output/public . && echo '::set-output name=VERSION::${nextRelease.version}'"
|
||||
"publishCmd": "tar -czvf release-${nextRelease.version}.tar.gz -C .output/public . && echo \"VERSION=${nextRelease.version}\" >> \"$GITHUB_OUTPUT\""
|
||||
}
|
||||
],
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user