Skip to content

use upload-artifact to zip addon folder #6

use upload-artifact to zip addon folder

use upload-artifact to zip addon folder #6

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:
fetch-depth: 0
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 | cut -c 2-)
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 }}" >> $GITHUB_ENV
- name: Replace version in install.rdf
run: |
sed -i "s/1.0.0-unbundeled/${{ env.VERSION }}-${{ env.DATE }}/" addon/install.rdf
- name: Upload XPI to Release
uses: actions/upload-artifact@v4
with:
name: ${{ env.XPI_NAME }}
path: addon/
# - name: Create Release (optional)
# uses: ncipollo/release-action@v3
# with:
# tag_name: ${{ env.VERSION }}-${{ env.DATE }}
# artifacts: ${{ github.workflow }}/tabmix-dev-build/*.xpi