diff --git a/.github/workflows/build-packages.yaml b/.github/workflows/build-packages.yaml index 61dad71..09913ae 100644 --- a/.github/workflows/build-packages.yaml +++ b/.github/workflows/build-packages.yaml @@ -9,21 +9,17 @@ jobs: name: Build Packages runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: persist-credentials: false - + - name: Enable Corepack + run: corepack enable - name: Setup NodeJS - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: - node-version: 18 + node-version: 24 cache: 'yarn' - - name: Setup Yarn - run: | - npm install -g yarn - echo "Yarn version: $(yarn -v)" - # Build is triggered in prepare script - name: Install Dependencies run: yarn install --frozen-lockfile diff --git a/.github/workflows/dev-packages.yaml b/.github/workflows/dev-packages.yaml deleted file mode 100644 index 1b06303..0000000 --- a/.github/workflows/dev-packages.yaml +++ /dev/null @@ -1,35 +0,0 @@ -# Action to publish packages under the `next` tag for testing -# Packages are versioned as `0.0.0-{tag}-DATETIMESTAMP` -name: Packages Deploy - -on: workflow_dispatch - -jobs: - publish: - name: Publish Dev Packages - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - persist-credentials: false - - - name: Setup NodeJS - uses: actions/setup-node@v4 - with: - node-version: 18 - - - name: Setup Yarn - run: | - npm install -g yarn - echo "Yarn version: $(yarn -v)" - echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" >> ~/.npmrc - - # This also builds the package as part of the post install - - name: Install Dependencies - run: yarn install --frozen-lockfile - - - name: Development Version - run: | - node ./scripts/dev-package-pre-version.js - yarn changeset version --no-git-tag --snapshot dev - yarn changeset publish --tag dev diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a22ac38..68b8b22 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,32 +4,55 @@ on: push: branches: - main + workflow_dispatch: + # Dev publishing concurrency: ${{ github.workflow }}-${{ github.ref }} +permissions: + id-token: write # Required for OIDC + contents: write # Required for changesets pushing + pull-requests: write # Required for changesets to create PRs + jobs: release: name: Release runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v4 - - - name: Setup Node.js 18 - uses: actions/setup-node@v4 + uses: actions/checkout@v5 + - name: Enable Corepack + run: corepack enable + - name: Setup Node.js 24 + uses: actions/setup-node@v6 with: - node-version: 18 + node-version: 24 + cache: yarn + - name: Update npm + run: | + npm install -g npm@latest + npm --version # This also builds the package as part of the post install - name: Install Dependencies - run: yarn + run: yarn install --frozen-lockfile - name: Create Release Pull Request or Publish to npm id: changesets uses: changesets/action@v1 + if: ${{ github.event_name == 'push' }} with: # This expects you to have a script called release which does a build for your packages and calls changeset publish publish: yarn release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Dev publish + if: ${{ github.event_name == 'workflow_dispatch' }} + run: | + node ./scripts/dev-package-pre-version.js + yarn changeset version --no-git-tag --snapshot dev + yarn changeset publish --tag dev + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 81b8787..060b4f7 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -13,6 +13,8 @@ jobs: - uses: actions/checkout@v5 with: persist-credentials: false + - name: Enable Corepack + run: corepack enable - name: Enable KVM group perms run: | @@ -33,9 +35,9 @@ jobs: key: avd-31 - name: Setup NodeJS - uses: actions/setup-node@v5 + uses: actions/setup-node@v6 with: - node-version: 18 + node-version: 24 cache: 'yarn' - name: Set up JDK 17 @@ -45,11 +47,6 @@ jobs: distribution: 'adopt' cache: 'gradle' - - name: Setup Yarn - run: | - npm install -g yarn - echo "Yarn version: $(yarn -v)" - - name: Install Dependencies run: yarn install --frozen-lockfile @@ -93,6 +90,8 @@ jobs: - uses: actions/checkout@v5 with: persist-credentials: false + - name: Enable Corepack + run: corepack enable - uses: irgaly/xcode-cache@v1 if: false # Currently broken, see e.g. https://github.com/powersync-ja/react-native-quick-sqlite/actions/runs/18458692696/job/52584961537 @@ -111,14 +110,9 @@ jobs: - name: Setup NodeJS uses: actions/setup-node@v5 with: - node-version: 18 + node-version: 24 cache: 'yarn' - - name: Setup Yarn - run: | - npm install -g yarn - echo "Yarn version: $(yarn -v)" - - name: Install Dependencies run: yarn install --frozen-lockfile