Compare commits
No commits in common. "main" and "2026.2.1" have entirely different histories.
@ -9,16 +9,29 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: https://github.com/actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # Full history for tag counting
|
fetch-depth: 0 # Full history for tag counting
|
||||||
|
|
||||||
|
# Generate CalVer: YYYY.MM.BUILD
|
||||||
|
# BUILD = count of tags matching current month + 1
|
||||||
- name: Generate CalVer version
|
- name: Generate CalVer version
|
||||||
id: calver
|
id: meta
|
||||||
uses: cal/gitea-actions/calver@main
|
run: |
|
||||||
|
YEAR=$(date -u +%Y)
|
||||||
|
MONTH=$(date -u +%-m)
|
||||||
|
PREFIX="${YEAR}.${MONTH}."
|
||||||
|
|
||||||
|
git fetch --tags
|
||||||
|
BUILD=$(git tag -l "${PREFIX}*" | wc -l)
|
||||||
|
BUILD=$((BUILD + 1))
|
||||||
|
|
||||||
|
VERSION="${PREFIX}${BUILD}"
|
||||||
|
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
||||||
|
echo "CalVer version: ${VERSION}"
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: https://github.com/actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '20'
|
node-version: '20'
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
@ -30,7 +43,7 @@ jobs:
|
|||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
- name: Deploy to Foundry server
|
- name: Deploy to Foundry server
|
||||||
uses: https://github.com/burnett01/rsync-deployments@7.0.1
|
uses: burnett01/rsync-deployments@7.0.1
|
||||||
with:
|
with:
|
||||||
switches: -avz --delete --exclude='.git' --exclude='node_modules' --exclude='foundrydata' --exclude='.env' --exclude='.env.example' --exclude='.gitea' --exclude='.github' --exclude='.claude' --exclude='.husky' --exclude='docs' --exclude='docker-compose.yml' --exclude='test_results'
|
switches: -avz --delete --exclude='.git' --exclude='node_modules' --exclude='foundrydata' --exclude='.env' --exclude='.env.example' --exclude='.gitea' --exclude='.github' --exclude='.claude' --exclude='.husky' --exclude='docs' --exclude='docker-compose.yml' --exclude='test_results'
|
||||||
path: ./
|
path: ./
|
||||||
@ -40,7 +53,7 @@ jobs:
|
|||||||
remote_key: ${{ secrets.DEPLOY_SSH_KEY }}
|
remote_key: ${{ secrets.DEPLOY_SSH_KEY }}
|
||||||
|
|
||||||
- name: Fix ownership and restart Foundry
|
- name: Fix ownership and restart Foundry
|
||||||
uses: https://github.com/appleboy/ssh-action@v1
|
uses: appleboy/ssh-action@v1
|
||||||
with:
|
with:
|
||||||
host: ${{ secrets.DEPLOY_HOST }}
|
host: ${{ secrets.DEPLOY_HOST }}
|
||||||
username: root
|
username: root
|
||||||
@ -49,9 +62,13 @@ jobs:
|
|||||||
chown -R 1000:1000 /opt/foundry/data/Data/systems/vagabond/
|
chown -R 1000:1000 /opt/foundry/data/Data/systems/vagabond/
|
||||||
cd /opt/foundry && docker compose restart foundry
|
cd /opt/foundry && docker compose restart foundry
|
||||||
|
|
||||||
|
# Create git tag via Gitea API (avoids branch protection issues)
|
||||||
- name: Tag release
|
- name: Tag release
|
||||||
if: success()
|
if: success()
|
||||||
uses: cal/gitea-actions/gitea-tag@main
|
run: |
|
||||||
with:
|
curl -s -X POST \
|
||||||
version: ${{ steps.calver.outputs.version }}
|
-H "Authorization: token ${{ github.token }}" \
|
||||||
token: ${{ github.token }}
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{\"tag_name\": \"${{ steps.meta.outputs.version }}\", \"target\": \"${{ github.sha }}\", \"name\": \"${{ steps.meta.outputs.version }}\"}" \
|
||||||
|
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/tags"
|
||||||
|
echo "Created tag ${{ steps.meta.outputs.version }}"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user