styling & fixing #30 somewhat #83
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is the thingy for GitHub to make it do some stuff. | |
# Aka, "build" and Zip up the Firefox & Chrome versions | |
# of this extension. Basically similar to how OldTwitter | |
# does it. (Kinda copied some stuff lol) | |
name: PlayerTube build-n-pack | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the "main" branch | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# Setup Node.js environment. | |
- name: Setup Node.js environment | |
uses: actions/[email protected] | |
# Install the NPM modules that are included with this repo. | |
- name: Install NPM packages | |
run: npm install | |
# Get the ability to unzip. | |
- name: Install action-zip | |
uses: montudor/[email protected] | |
# Run the "build.js" script through our newly acquired Node.js environment. | |
- name: Run the build node script | |
run: npm start | |
# Unzip stuffs. | |
- name: Unzip extension | |
run: unzip -qq ../PlayerTube-Chrome -d PlayerTube-Chrome; unzip -qq ../PlayerTube-Firefox.zip -d PlayerTube-Firefox | |
working-directory: ${{ github.workspace }} | |
# Upload the ZIP files to the "Artifacts" tab on this action's page. | |
## Firefox | |
- name: Upload the Firefox build to the "Artifacts" tab | |
uses: actions/[email protected] | |
with: | |
name: PlayerTube Firefox Build | |
path: ${{ github.workspace }}/PlayerTube-Firefox | |
## Chrome | |
- name: Upload the Chromium build to the "Artifacts" tab | |
uses: actions/[email protected] | |
with: | |
name: PlayerTube Chromium Build | |
path: ${{ github.workspace }}/PlayerTube-Chrome |