Skip to content

add ref to main

add ref to main #3

Workflow file for this run

name: Build Firefox Extension XPI
on:
push:
branches: [ wip/build-xpi ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
ref: main
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Download deps
uses: bahmutov/npm-install@v1
with:
useLockFile: false
- name: Get latest tag version
id: get-version
run: |
version=$(git describe --abbrev=0 --tags)
echo "VERSION=$version" >> $GITHUB_ENV
- name: Generate 8-digit date
id: get-date
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
- name: Set XPI file name
run: |
echo "XPI_NAME=tabmix-dev-build-${{ env.VERSION }}-${{ env.DATE }}.xpi" >> $GITHUB_ENV
- name: Replace version in install.rdf
run: |
sed -i "s/1.0.0-unbundeled/${{ env.VERSION }}-${{ env.DATE }}.xpi/" addon/install.rdf
- name: Zip addon folder
run: zip -r ${{ env.XPI_NAME }} addon/*
- name: Upload XPI to Release
uses: actions/upload-artifact@v4
with:
name: ${{ env.XPI_NAME }}
path: ${{ env.XPI_NAME }}
# - name: Create Release (optional)
# uses: ncipollo/release-action@v3
# with:
# tag_name: ${{ env.VERSION }}-${{ env.DATE }}
# artifacts: ${{ github.workflow }}/tabmix-dev-build/*.xpi