Compare commits

...

4 Commits

Author SHA1 Message Date
neobooru 82dfc45e3b Update GitHub actions artifact names 2023-07-15 15:59:44 +02:00
neobooru 530e3fc8d8 Add name to action jobs 2023-07-15 15:55:49 +02:00
neobooru c1f6686d2a Update 2023-07-15 15:54:01 +02:00
neobooru 160b59a9a3 Trying out GitHub Actions 2023-07-15 15:50:11 +02:00
4 changed files with 104 additions and 0 deletions

View File

@ -0,0 +1,42 @@
name: "Setup project"
runs:
using: "composite"
steps:
- uses: actions/setup-dotnet@v3
with:
dotnet-version: "7.0.x"
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0
with:
versionSpec: "5.x"
- name: Determine Version
uses: gittools/actions/gitversion/execute@v0
id: version
- name: Use the version
shell: bash
run: |
echo SZ_VERSION="${{ steps.version.outputs.AssemblySemFileVer }}" >> $GITHUB_ENV
echo SZ_VERSION_NAME="${{ steps.version.outputs.InformationalVersion }}" >> $GITHUB_ENV
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- uses: actions/setup-node@v3
with:
node-version: "16"
cache: "pnpm"
- name: Install dependencies
shell: bash
run: pnpm install
- name: Linter
shell: bash
run: pnpm lint

54
.github/workflows/build.yaml vendored Normal file
View File

@ -0,0 +1,54 @@
name: Build release
on: [push]
jobs:
build_chrome:
name: "Build Chrome Extension"
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: ./.github/actions/setup-for-build
- name: Build
run: pnpm build
- name: Pack ZIP
run: pnpm pack:zip
- uses: actions/upload-artifact@v3
with:
name: Chrome Extension (Unsigned)
path: extension.zip
build_firefox:
name: "Build Firefox Extension"
runs-on: ubuntu-20.04
# Doesn't really need the Chrome build, but we can reuse its cache.
needs: build_chrome
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: ./.github/actions/setup-for-build
- name: Build
run: pnpm build
env:
SZ_GECKO_ID: 13372607-2257-4360-8f51-5ce66fa73350
- name: Sign XPI
run: pnpm sign:firefox
env:
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }}
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }}
- uses: actions/upload-artifact@v3
with:
name: Firefox Extension (Signed)
path: web-ext-artifacts/*.xpi

1
.gitignore vendored
View File

@ -14,3 +14,4 @@ extension/manifest.json
node_modules
src/auto-imports.d.ts
src/components.d.ts
*artifacts/

7
GitVersion.yml Normal file
View File

@ -0,0 +1,7 @@
mode: ContinuousDelivery
increment: None
assembly-file-versioning-format: "{Major}.{Minor}.{Patch}.{CommitsSinceVersionSource}"
branches: {}
ignore:
sha: []
merge-message-formats: {}