name: 'Enable Lightbearer pack'

on:
  schedule:
    # Run annually at 04:00 UTC on November 1st.
    - cron: '0 4 1 11 *'
  workflow_dispatch:

jobs:
  enable-anniversary:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          ref: ${{ github.head_ref }}

      - name: Read .nvmrc
        run: echo ::set-output name=NVMRC::$(cat .nvmrc)
        id: nvm

      - name: Set up Node.js
        uses: actions/setup-node@v1
        with:
          node-version: '${{ steps.nvm.outputs.NVMRC }}'

      - name: Install dependencies
        run: npm install

      - name: Enable pack
        run: |
          node scripts/enable-marker-pack.mjs lightbearer
          git config user.name 'Mathias Bynens'
          git config user.email 'mathias@qiwi.be'
          git commit data -m 'Enable Lightbearer pack' -m 'This patch enables the Lightbearer markers in preparation for the upcoming event (which runs from January 7th until January 10th).'
          git push

name: 'Enable Anniversary pack'

on:
  schedule:
    # Run annually at 04:00 UTC on December 1st.
    - cron: '0 4 1 12 *'
  workflow_dispatch:

jobs:
  enable-anniversary:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          ref: ${{ github.head_ref }}

      - name: Read .nvmrc
        run: echo ::set-output name=NVMRC::$(cat .nvmrc)
        id: nvm

      - name: Set up Node.js
        uses: actions/setup-node@v1
        with:
          node-version: '${{ steps.nvm.outputs.NVMRC }}'

      - name: Install dependencies
        run: npm install

      - name: Enable pack
        run: |
          node scripts/enable-marker-pack.mjs anniversary
          git config user.name 'Mathias Bynens'
          git config user.email 'mathias@qiwi.be'
          git commit data -m 'Enable Anniversary pack' -m 'This patch enables the Tibia Anniversary markers in preparation for the upcoming event (which runs from January 7th until January 10th).'
          git push

Fix typo in Anniversary pack script
Fix typo in Anniversary pack script
