Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tea -> pkgx for ci/cd #800

Merged
merged 29 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions .github/workflows/build-sign-notarize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@ jobs:
outputs:
is-updated: ${{ steps.check_version.outputs.updated }}
steps:
- uses: teaxyz/setup@v0
with:
version: 0.35.7
- uses: actions/checkout@v3
with:
fetch-depth: 5
- uses: pkgxdev/setup@v1
- name: Check if version in package.json was updated
id: check_version
run: |
Expand Down Expand Up @@ -69,10 +67,8 @@ jobs:
s3-artifacts-key: ${{ steps.s3-artifact-uploader.outputs.key }}
build-version: ${{ steps.gui-version.outputs.version }}
steps:
- uses: teaxyz/setup@v0
with:
version: 0.35.7
- uses: actions/checkout@v3
- uses: pkgxdev/dev@v0

- name: cache node_modules build
# TODO: cache issue in our self-hosted macos runner ESPIPE: invalid seek, read
Expand All @@ -92,7 +88,7 @@ jobs:
./svelte/build

- name: build
run: tea -SE xc dist
run: xc dist
env:
NOTARIZE: true
PUBLIC_MIXPANEL_TOKEN: ${{ secrets.MIXPANEL_PROJECT_TOKEN }}
Expand Down
24 changes: 9 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@ jobs:
needs: changes
runs-on: macos-latest
steps:
- uses: teaxyz/setup@v0
with:
version: 0.35.7
- uses: actions/checkout@v3
- uses: pkgxdev/dev@v0
- name: cache node_modules build
uses: actions/cache@v3
with:
Expand All @@ -49,7 +47,7 @@ jobs:
run: |
cp .env.example svelte/.env
- name: install app dependencies
run: tea -E xc setup
run: xc setup
- name: test build electron main process
run: npm run build:main
# TODO: fix
Expand All @@ -67,10 +65,8 @@ jobs:
# see: https://github.com/electron-userland/electron-builder/issues/3179
USE_HARD_LINKS: false
steps:
- uses: teaxyz/setup@v0
with:
version: 0.35.7
- uses: actions/checkout@v3
- uses: pkgxdev/dev@v0
- name: cache node_modules build
uses: actions/cache@v3
with:
Expand All @@ -79,9 +75,9 @@ jobs:
- name: env file
run: cp .env.example svelte/.env
- name: install app dependencies
run: tea -E xc setup
run: xc setup
- name: test build electron main process
run: tea -E xc build
run: xc build
env:
NOTARIZE: "false"
CSC_IDENTITY_AUTO_DISCOVERY: "false"
Expand All @@ -91,16 +87,14 @@ jobs:
mkdir -p /Users/runner/.tea/tea.xyz/gui
touch /Users/runner/.tea/tea.xyz/gui/dev
- name: e2e test
run: tea -E xc e2e
run: xc e2e

build_svelte:
needs: changes
runs-on: macos-latest
steps:
- uses: teaxyz/setup@v0
with:
version: 0.35.7
- uses: actions/checkout@v3
- uses: pkgxdev/dev@v0
- name: cache node_modules build
uses: actions/cache@v3
with:
Expand All @@ -118,7 +112,7 @@ jobs:
- name: get gui version
id: gui-version
run: |
tea +stedolan.github.io/jq
pkgx +stedolan.github.io/jq
export version=$(echo $(cat package.json) | jq --raw-output .version)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could avoid line 115 and just do pkgx jq --raw… here

export postfix=
if GIT_DIR=/path/to/repo/.git git rev-parse $1 >/dev/null 2>&1
Expand All @@ -130,7 +124,7 @@ jobs:
echo "version=$version$postfix" >> $GITHUB_OUTPUT

- name: build
run: tea -E xc build:lite
run: xc build:lite
env:
PUBLIC_VERSION: ${{ steps.gui-version.outputs.version }}
BUILD_FOR: preview
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,18 @@ jobs:
- name: cp latest as previous release
run: |
aws s3 cp \
s3://dist.tea.xyz/tea.xyz/gui/tea-latest-arm64.dmg \
s3://dist.tea.xyz/tea.xyz/gui/tea-previous-arm64.dmg
s3://preview.gui.tea.xyz/release/ossapp-latest-arm64.dmg \
s3://preview.gui.tea.xyz/release/ossapp-previous-arm64.dmg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put the bucket id in a secret

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

applied all of this.

aws s3 cp \
s3://dist.tea.xyz/tea.xyz/gui/tea-latest.dmg \
s3://dist.tea.xyz/tea.xyz/gui/tea-previous.dmg
s3://preview.gui.tea.xyz/release/ossapp-latest.dmg \
s3://preview.gui.tea.xyz/release/ossapp-previous.dmg
- name: publish release
run: |
cd dist && \
aws s3 sync . \
"s3://preview.gui.tea.xyz/release/"
aws s3 cp $ARM_URL s3://dist.tea.xyz/tea.xyz/gui/tea-latest-arm64.dmg
aws s3 cp $X86_URL s3://dist.tea.xyz/tea.xyz/gui/tea-previous-arm64.dmg
aws s3 cp $ARM_URL s3://preview.gui.tea.xyz/release/ossapp-latest-arm64.dmg
aws s3 cp $X86_URL s3://preview.gui.tea.xyz/release/ossapp-latest.dmg
env:
ARM_URL: s3://preview.gui.tea.xyz/release/${{ steps.app_files.outputs.dmg_arm64 }}
X86_URL: s3://preview.gui.tea.xyz/release/${{ steps.app_files.outputs.dmg_x86 }}
Expand Down
2 changes: 1 addition & 1 deletion devops/ubuntu/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh -l
tea -SE .
tea -ES xc build
pkgx xc build
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ossapp",
"version": "0.3.0",
"version": "0.3.1",
"private": true,
"description": "The Open Source App Store",
"author": "pkgx inc. <hello@pkgx.dev>",
Expand Down Expand Up @@ -147,5 +147,5 @@
},
"homepage": "https://pkgx.app",
"repository": "https://github.com/pkgxdev/ossapp.git",
"tea": "node^18.16 npm^9.7.2 python^3.11 xc make"
"pkgx": "node^18.16 npm^9.7.2 python@3.11 xc make"
}