ci: initial setup
This commit is contained in:
parent
8bcb0e1ea4
commit
6611372d73
|
@ -0,0 +1,59 @@
|
||||||
|
name: Build/Publish
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- develop
|
||||||
|
- develop-*
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Use Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 18.x
|
||||||
|
cache: 'npm'
|
||||||
|
- run: npm ci
|
||||||
|
- run: npm run build --if-present
|
||||||
|
env:
|
||||||
|
NODE_OPTIONS: "--max_old_space_size=4096"
|
||||||
|
- name: Install SSH key
|
||||||
|
uses: shimataro/ssh-key-action@v2
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.GITEA_SSH_KEY }}
|
||||||
|
known_hosts: ${{ secrets.GITEA_KNOWN_HOST }}
|
||||||
|
|
||||||
|
- name: Download YQ
|
||||||
|
run: |
|
||||||
|
wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq &&\
|
||||||
|
chmod +x /usr/bin/yq
|
||||||
|
- name: Set up S3CMD
|
||||||
|
uses: s3-actions/s3cmd@v1.5.0
|
||||||
|
with:
|
||||||
|
provider: aws # default is linode
|
||||||
|
region: 'eu-central-1'
|
||||||
|
access_key: ${{ secrets.S3_ACCESS_KEY }}
|
||||||
|
secret_key: ${{ secrets.S3_ACCESS_KEY }}
|
||||||
|
|
||||||
|
- name: Publish
|
||||||
|
run: npm run semantic-release
|
||||||
|
env:
|
||||||
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
- name: Publish to Firefox
|
||||||
|
uses: yayuyokitano/firefox-addon@v0.0.6-alpha
|
||||||
|
with:
|
||||||
|
api_key: ${{ secrets.AMO_ISSUER }}
|
||||||
|
api_secret: ${{ secrets.AMO_SECRET }}
|
||||||
|
guid: 'contact@luneweb.com'
|
||||||
|
xpi_path: ${{ env.PKG }}
|
||||||
|
src_path: ${{ env.PKG_SRC }}
|
||||||
|
- name: Setup tmate session
|
||||||
|
uses: mxschmitt/action-tmate@v3
|
||||||
|
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled && failure() }}
|
||||||
|
with:
|
||||||
|
limit-access-to-actor: true
|
|
@ -0,0 +1,80 @@
|
||||||
|
{
|
||||||
|
"plugins": [
|
||||||
|
[
|
||||||
|
"@semantic-release/commit-analyzer",
|
||||||
|
{
|
||||||
|
"releaseRules": [
|
||||||
|
{
|
||||||
|
"breaking": true,
|
||||||
|
"release": "major"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"revert": true,
|
||||||
|
"release": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "feat",
|
||||||
|
"release": "minor"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "fix",
|
||||||
|
"release": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "perf",
|
||||||
|
"release": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "dep",
|
||||||
|
"release": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "refactor",
|
||||||
|
"release": "patch"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@semantic-release/release-notes-generator",
|
||||||
|
[
|
||||||
|
"@semantic-release/changelog",
|
||||||
|
{
|
||||||
|
"changelogFile": "CHANGELOG.md"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"@semantic-release/npm",
|
||||||
|
{
|
||||||
|
"npmPublish": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"@semantic-release/exec",
|
||||||
|
{
|
||||||
|
"publishCmd": "./publish.sh ${nextRelease.version}"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"@semantic-release/git",
|
||||||
|
{
|
||||||
|
"assets": [
|
||||||
|
"package.json",
|
||||||
|
"CHANGELOG.md",
|
||||||
|
"npm-shrinkwrap.json",
|
||||||
|
"assets/manifest.json"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"branches": [
|
||||||
|
"master",
|
||||||
|
{
|
||||||
|
"name": "develop",
|
||||||
|
"prerelease": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "develop-*",
|
||||||
|
"prerelease": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,11 +1,10 @@
|
||||||
{
|
{
|
||||||
"name": "@lumeweb/extension",
|
"name": "@lumeweb/extension",
|
||||||
"version": "0.3.0",
|
"version": "0.4.0-develop.1",
|
||||||
"description": "Lume Web is your decentralized gateway into the web3 internet, the web owned and controlled by its users",
|
"description": "Lume Web is your decentralized gateway into the web3 internet, the web owned and controlled by its users",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"readme": "ERROR: No README data found!",
|
"readme": "ERROR: No README data found!",
|
||||||
"_id": "@lumeweb/extension@0.3.0",
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "presetter bootstrap",
|
"prepare": "presetter bootstrap",
|
||||||
"build": "run build",
|
"build": "run build",
|
||||||
|
@ -13,6 +12,7 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@lumeweb/presetter-kernel-module-preset": "^0.1.0-develop.44",
|
"@lumeweb/presetter-kernel-module-preset": "^0.1.0-develop.44",
|
||||||
|
"@semantic-release/exec": "^6.0.3",
|
||||||
"@tsconfig/svelte": "^5.0.0",
|
"@tsconfig/svelte": "^5.0.0",
|
||||||
"@types/object-diff": "^0.0.2",
|
"@types/object-diff": "^0.0.2",
|
||||||
"@types/react": "^18.2.17",
|
"@types/react": "^18.2.17",
|
||||||
|
@ -26,7 +26,8 @@
|
||||||
"sass": "^1.63.6",
|
"sass": "^1.63.6",
|
||||||
"svelte-check": "^3.4.6",
|
"svelte-check": "^3.4.6",
|
||||||
"tailwindcss": "^3.3.3",
|
"tailwindcss": "^3.3.3",
|
||||||
"typescript": "^5.1.6"
|
"typescript": "^5.1.6",
|
||||||
|
"web-ext": "^7.6.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@helia/unixfs": "^1.4.0",
|
"@helia/unixfs": "^1.4.0",
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
export VERSION="$1"
|
||||||
|
export PKG="web-ext-artifacts/lume_web-${VERSION}.zip"
|
||||||
|
export PKG_SRC="web-ext-artifacts/lume_web-${VERSION}-src.zip"
|
||||||
|
yq -i '.version = strenv(VERSION)' assets/manifest.json
|
||||||
|
cp assets/manifest.json dist/
|
||||||
|
web-ext build -s dist
|
||||||
|
mkdir -p dist-src
|
||||||
|
cp -r assets shared src ui *.json .js dist-src/
|
||||||
|
zip -r "web-ext-artifacts/lume_web-${VERSION}-src.zip" dist-src/
|
||||||
|
|
||||||
|
echo "EXTENSION_VERSION=${VERSION}" >> $GITHUB_ENV
|
||||||
|
echo "PKG=${PKG}" >> $GITHUB_ENV
|
||||||
|
echo "PKG_SRC=${PKG_SRC}" >> $GITHUB_ENV
|
Reference in New Issue