-
Notifications
You must be signed in to change notification settings - Fork 2
77 lines (65 loc) · 2.82 KB
/
test-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Test and release
# Run the workflow when a Pull Request is opened or when changes are pushed to master on 'meneltamar/fvtt-comprehend-languages' (i.e. don't run on forks)
on:
pull_request:
push:
branches: [master]
jobs:
release:
# Only release on push to master on meneltamar/fvtt-comprehend-languages
if: github.event_name == 'push' && (github.ref == 'refs/heads/master') && github.repository == 'meneltamar/fvtt-comprehend-languages'
runs-on: ubuntu-latest
# Waits for test jobs for each Node.js version to complete
# needs: [ test ]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: "true"
# Not sure this is the right way to do it
# - name: Pull & update submodules recursively
# run: |
# git submodule update --init --recursive
# git submodule update --recursive --remote
# - uses: stefanzweifel/[email protected]
# with:
# commit_message: "chore: Update submodules"
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: 18.x
cache: "npm"
- name: Install
run: npm install
# - name: Build packs
# run: npm run build:packs
- name: Build
run: npm run build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
- name: Get tag
run: echo "COMPREHEND_LANGUAGES_VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
# Publish the release to FoundryVTT's package repository only if push on main
# - name: Publish to Foundry Admin
# if: github.event_name == 'push' && (github.ref == 'refs/heads/master') && github.repository == 'meneltamar/fvtt-comprehend-languages'
# uses: Varriount/[email protected]
# with:
# username: ${{ secrets.FOUNDRY_ADMIN_USERNAME }}
# password: ${{ secrets.FOUNDRY_ADMIN_PASSWORD }}
# module-id: 2553
# manifest-url: https://github.com/meneltamar/fvtt-comprehend-languages/releases/download/${{ env.COMPREHEND_LANGUAGES_VERSION }}/module.json
# manifest-file: module.json
#
# - name: Install playwright
# run: npx playwright install
- name: Publish to Foundry VTT Repo
id: publish_foundry_repo
if: github.event_name == 'push' && (github.ref == 'refs/heads/master') && github.repository == 'meneltamar/fvtt-comprehend-languages'
run: npx @ghost-fvtt/foundry-publish
env:
FVTT_MANIFEST_PATH: "static/module.json"
FVTT_PACKAGE_ID: ${{ 2553 }}
FVTT_USERNAME: ${{ secrets.FOUNDRY_ADMIN_USERNAME }}
FVTT_PASSWORD: ${{ secrets.FOUNDRY_ADMIN_PASSWORD }}