diff --git a/.github/workflows/changeset.yml b/.github/workflows/changeset.yml new file mode 100644 index 0000000..5326ecb --- /dev/null +++ b/.github/workflows/changeset.yml @@ -0,0 +1,47 @@ +name: Changeset + +on: + push: + branches: + - dev + +permissions: {} +jobs: + release: + permissions: + contents: write # to create release (changesets/action) + pull-requests: write # to create pull request (changesets/action) + name: Release + runs-on: ubuntu-22.04 + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + with: + # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits + fetch-depth: 0 + - uses: pnpm/action-setup@v2.2.4 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 20 + cache: pnpm + + - name: Install + run: pnpm install --frozen-lockfile + - name: Install + run: pnpm svelte:build + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf + + - name: Create Release Pull Request + id: changesets + uses: changesets/action@v1 + with: + version: pnpm changeset:version + title: Version App + commit: Version App + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 86335f1..fb64a27 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -21,7 +21,12 @@ jobs: with: fetch-depth: 0 - - name: Install Node.js + - name: Pnpm setup + uses: pnpm/action-setup@v2 + with: + version: 8.10 + + - name: Use Node.js 20 uses: actions/setup-node@v3 with: node-version: 20 diff --git a/package.json b/package.json index f57d267..dd4a312 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "check": "svelte-check --tsconfig ./tsconfig.json", "svelte:build": "vite build", "svelte:dev": "vite dev", - "changeset": "changeset" + "changeset:version": "changeset version" }, "lint-staged": { "*.{ts,svelte}": [