Skip to content

Commit

Permalink
ci: introduce devbox to stabilize environment
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-heimbuch committed Dec 7, 2024
1 parent 9645905 commit f19eb2c
Show file tree
Hide file tree
Showing 6 changed files with 23,983 additions and 636 deletions.
32 changes: 22 additions & 10 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
name: Qualify Branch
on: push
jobs:
build:
name: Build
qualify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Build
run: |
npm ci
npm run build
- uses: actions/checkout@v3
- name: install
uses: jetpack-io/devbox-install-action@v0.11.0
with:
enable-cache: true
- name: npm env
id: npm
shell: bash
run: |
echo "npm_hash_key=${{ runner.os }}-npm-store-${{ hashFiles('**/package-lock.json') }}" >> "$GITHUB_OUTPUT"
echo "npm_restore_key=${{ runner.os }}-npm-store-" >> "$GITHUB_OUTPUT"
- uses: actions/cache@v4
name: setup npm cache
with:
path: '**/node_modules'
key: ${{ steps.npm.outputs.npm_hash_key }}
restore-keys: ${{ steps.npm.outputs.npm_restore_key }}
- name: install
run: devbox run npm ci
- name: build
run: devbox run npm run build
47 changes: 31 additions & 16 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,38 @@ on:
push:
tags:
- "*"

jobs:
tag:
name: New tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Build
run: |
npm ci
npm run publish:prepare
npm run publish:workspace
- name: WordPress Plugin Deploy
uses: 10up/action-wordpress-plugin-deploy@master
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SLUG: podlove-web-player
- uses: actions/checkout@v3
- name: install
uses: jetpack-io/devbox-install-action@v0.11.0
with:
enable-cache: true
- name: npm env
id: npm
shell: bash
run: |
echo "npm_hash_key=${{ runner.os }}-npm-store-${{ hashFiles('**/package-lock.json') }}" >> "$GITHUB_OUTPUT"
echo "npm_restore_key=${{ runner.os }}-npm-store-" >> "$GITHUB_OUTPUT"
- uses: actions/cache@v4
name: setup npm cache
with:
path: '**/node_modules'
key: ${{ steps.npm.outputs.npm_hash_key }}
restore-keys: ${{ steps.npm.outputs.npm_restore_key }}
- name: install
run: devbox run npm ci
- name: build
run: |
devbox run npm build
devbox run npm run publish:prepare
devbox run npm run publish:workspace
- name: WordPress Plugin Deploy
uses: 10up/action-wordpress-plugin-deploy@master
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SLUG: podlove-web-player
12 changes: 12 additions & 0 deletions devbox.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"packages": {
"nodejs": "20"
},
"shell": {
"init_hook": [],
"scripts": {}
},
"env": {
"NODE_OPTIONS": "--openssl-legacy-provider"
}
}
70 changes: 70 additions & 0 deletions devbox.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"lockfile_version": "1",
"packages": {
"nodejs@20": {
"last_modified": "2024-12-03T12:40:06Z",
"plugin_version": "0.0.2",
"resolved": "github:NixOS/nixpkgs/566e53c2ad750c84f6d31f9ccb9d00f823165550#nodejs_20",
"source": "devbox-search",
"version": "20.18.1",
"systems": {
"aarch64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/f0lm95g31vpknr8jj9xw53cx2rqly2nm-nodejs-20.18.1",
"default": true
},
{
"name": "libv8",
"path": "/nix/store/l17919sgiw0i3awxlpic9z9a3g2d0rgv-nodejs-20.18.1-libv8"
}
],
"store_path": "/nix/store/f0lm95g31vpknr8jj9xw53cx2rqly2nm-nodejs-20.18.1"
},
"aarch64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/vqv3dblqx76k185jg4ym5i3dz196lv19-nodejs-20.18.1",
"default": true
},
{
"name": "libv8",
"path": "/nix/store/1pp9h9ma5ps2w3n7abkd3ipgjnmixwpm-nodejs-20.18.1-libv8"
}
],
"store_path": "/nix/store/vqv3dblqx76k185jg4ym5i3dz196lv19-nodejs-20.18.1"
},
"x86_64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/gbrd92gjhi88lhj43bsa2y9zvcn4vsb8-nodejs-20.18.1",
"default": true
},
{
"name": "libv8",
"path": "/nix/store/85x3jn8wf6n6ihr3ar70fhgc4p87znsq-nodejs-20.18.1-libv8"
}
],
"store_path": "/nix/store/gbrd92gjhi88lhj43bsa2y9zvcn4vsb8-nodejs-20.18.1"
},
"x86_64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/wfxq6w9bkp5dcfr8yb6789b0w7128gnb-nodejs-20.18.1",
"default": true
},
{
"name": "libv8",
"path": "/nix/store/6cpw80r57lyippnjl5knrvymcwalv1m2-nodejs-20.18.1-libv8"
}
],
"store_path": "/nix/store/wfxq6w9bkp5dcfr8yb6789b0w7128gnb-nodejs-20.18.1"
}
}
}
}
}
Loading

0 comments on commit f19eb2c

Please sign in to comment.