Arindy 155f3175d5
Some checks failed
ci / ci (push) Failing after 1m35s
initial ci
2025-03-01 20:49:31 +01:00

60 lines
1.7 KiB
YAML

name: ci
on: [ push, pull_request ]
jobs:
ci:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
statuses: write
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- id: version
name: version
run: echo "VERSION=$(npm --silent run version)" >> ${GITHUB_OUTPUT}
- name: echo version
run: echo ${{ steps.version.outputs.VERSION }}
- name: npm install
run: npm install
- name: build
run: npm run build
- name: zip release
if: github.ref_name == 'main'
working-directory: dist
run: zip -r foundryvtt-dice-tower-${{ steps.version.outputs.VERSION }}.zip .
- name: create tag
if: github.ref_name == 'main'
run: |
git config user.email "ci@git.arindy.de"
git config user.name "gitea"
git tag ${{ steps.version.outputs.VERSION }} -m "release ${{ steps.version.outputs.VERSION }}"
git push origin main
git push origin ${{ steps.version.outputs.VERSION }}
- name: setup go
if: github.ref_name == 'main'
uses: https://github.com/actions/setup-go@v4
with:
go-version: '>=1.20.1'
- name: release
if: github.ref_name == 'main'
uses: https://gitea.com/actions/release-action@main
with:
files: |-
dist/foundryvtt-dice-tower-${{ steps.version.outputs.VERSION }}.zip
api_key: ${{ secrets.GITHUB_TOKEN }}
title: Release ${{ steps.version.outputs.VERSION }}