Trying out GitHub Actions
parent
5c2d6dcfe8
commit
160b59a9a3
|
|
@ -0,0 +1,39 @@
|
||||||
|
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
|
||||||
|
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
|
||||||
|
run: pnpm install
|
||||||
|
|
||||||
|
- name: Linter
|
||||||
|
run: pnpm lint
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
name: Build release
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
build_chrome:
|
||||||
|
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: extension-zip
|
||||||
|
path: extension.zip
|
||||||
|
|
||||||
|
build_firefox:
|
||||||
|
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: extension-xpi
|
||||||
|
path: web-ext-artifacts/*.xpi
|
||||||
|
|
@ -14,3 +14,4 @@ extension/manifest.json
|
||||||
node_modules
|
node_modules
|
||||||
src/auto-imports.d.ts
|
src/auto-imports.d.ts
|
||||||
src/components.d.ts
|
src/components.d.ts
|
||||||
|
*artifacts/
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
mode: ContinuousDelivery
|
||||||
|
increment: None
|
||||||
|
assembly-file-versioning-format: "{Major}.{Minor}.{Patch}.{CommitsSinceVersionSource}"
|
||||||
|
branches: {}
|
||||||
|
ignore:
|
||||||
|
sha: []
|
||||||
|
merge-message-formats: {}
|
||||||
Loading…
Reference in New Issue