Skip to content

Version Packages (#723) #1

Version Packages (#723)

Version Packages (#723) #1

Workflow file for this run

name: Publish packages and crates
on:
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
call-rust-build:
uses: ./.github/workflows/rust-build.yaml
call-rust-plugin-react-build:
uses: ./.github/workflows/rust-plugin-build.yaml
with:
root: rust-plugins/react
name: plugin-react
call-rust-plugin-sass-build:
uses: ./.github/workflows/rust-plugin-build.yaml
with:
root: rust-plugins/sass
name: plugin-sass
release:
name: Release
needs:
[
call-rust-build,
call-rust-plugin-react-build,
call-rust-plugin-sass-build
]
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
# download rust core artifacts
- uses: actions/download-artifact@v3
id: download-linux-x64-gnu
with:
name: ${{ github.sha }}-linux-x64-gnu
path: ./packages/core/npm/linux-x64-gnu
- name: List Files
run: ls -l ./packages/core/npm/linux-x64-gnu
# copy the binary to core/binding
- name: Copy Core binary
run: cp ./packages/core/npm/linux-x64-gnu/farm.linux-x64-gnu.node ./packages/core/binding
- uses: actions/download-artifact@v3
id: download-darwin-x64
with:
name: ${{ github.sha }}-darwin-x64
path: ./packages/core/npm/darwin-x64
- name: List Files
run: ls -l ./packages/core/npm/darwin-x64
- uses: actions/download-artifact@v3
id: download-win32-x64-msvc
with:
name: ${{ github.sha }}-win32-x64-msvc
path: ./packages/core/npm/win32-x64-msvc
- name: List Files
run: ls -l ./packages/core/npm/win32-x64-msvc
- uses: actions/download-artifact@v3
id: download-darwin-arm64
with:
name: ${{ github.sha }}-darwin-arm64
path: ./packages/core/npm/darwin-arm64
- name: List Files
run: ls -l ./packages/core/npm/darwin-arm64
# download rust plugin react artifacts
- uses: actions/download-artifact@v3
id: download-plugin-react-linux-x64-gnu
with:
name: ${{ github.sha }}-linux-x64-gnu-plugin-react
path: ./rust-plugins/react/npm/linux-x64-gnu
- name: List Files
run: ls -l ./rust-plugins/react/npm/linux-x64-gnu
- uses: actions/download-artifact@v3
id: download-plugin-react-darwin-x64
with:
name: ${{ github.sha }}-darwin-x64-plugin-react
path: ./rust-plugins/react/npm/darwin-x64
- name: List Files
run: ls -l ./rust-plugins/react/npm/darwin-x64
- uses: actions/download-artifact@v3
id: download-plugin-react-win32-x64-msvc
with:
name: ${{ github.sha }}-win32-x64-msvc-plugin-react
path: ./rust-plugins/react/npm/win32-x64-msvc
- name: List Files
run: ls -l ./rust-plugins/react/npm/win32-x64-msvc
- uses: actions/download-artifact@v3
id: download-plugin-react-darwin-arm64
with:
name: ${{ github.sha }}-darwin-arm64-plugin-react
path: ./rust-plugins/react/npm/darwin-arm64
- name: List Files
run: ls -l ./rust-plugins/react/npm/darwin-arm64
# download rust plugin sass artifacts
- uses: actions/download-artifact@v3
id: download-plugin-sass-linux-x64-gnu
with:
name: ${{ github.sha }}-linux-x64-gnu-plugin-sass
path: ./rust-plugins/sass/npm/linux-x64-gnu
- name: List Files
run: ls -l ./rust-plugins/sass/npm/linux-x64-gnu
- uses: actions/download-artifact@v3
id: download-plugin-sass-darwin-x64
with:
name: ${{ github.sha }}-darwin-x64-plugin-sass
path: ./rust-plugins/sass/npm/darwin-x64
- name: List Files
run: ls -l ./rust-plugins/sass/npm/darwin-x64
- uses: actions/download-artifact@v3
id: download-plugin-sass-win32-x64-msvc
with:
name: ${{ github.sha }}-win32-x64-msvc-plugin-sass
path: ./rust-plugins/sass/npm/win32-x64-msvc
- name: List Files
run: ls -l ./rust-plugins/sass/npm/win32-x64-msvc
- uses: actions/download-artifact@v3
id: download-plugin-sass-darwin-arm64
with:
name: ${{ github.sha }}-darwin-arm64-plugin-sass
path: ./rust-plugins/sass/npm/darwin-arm64
- name: List Files
run: ls -l ./rust-plugins/sass/npm/darwin-arm64
- name: Install Dependencies
run: npm install -g pnpm && pnpm i --frozen-lockfile
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
version: pnpm run bump
publish: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# Test create farm and make sure it works after release
- name: Test Create Farm React
run: cd .. && pnpm create farm my-test-app-react --template react && cd my-test-app-react && pnpm build
- name: Test Create Farm Vue
run: cd .. && pnpm create farm my-test-app-vue --template vue && cd my-test-app-vue && pnpm build
- name: Test Create Farm Solid
run: cd .. && pnpm create farm my-test-app-solid --template solid && cd my-test-app-solid && pnpm build