diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..04d0a3227 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,35 @@ +name: ci + +on: + push: + branches: + - main + - ci/release-nightly + +permissions: {} + +jobs: + release: + runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'nuxt' && github.event_name == 'push' }} + permissions: + id-token: write + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + fetch-depth: 0 + - run: corepack enable + - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 + with: + node-version: 20 + registry-url: "https://registry.npmjs.org/" + cache: "pnpm" + + - name: Install dependencies + run: pnpm install + + - name: nightly release + run: pnpm changelogen --canary nightly --publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} + NPM_CONFIG_PROVENANCE: true diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..e69de29bb diff --git a/package.json b/package.json index e350be092..571e8e47f 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,8 @@ "lint:fix": "eslint --ext .vue,.ts,.js,.mjs . --fix", "test:examples": "pnpm -r test", "prepack": "unbuild", - "dev:prepare": "unbuild --stub" + "dev:prepare": "unbuild --stub", + "release": "pnpm test:examples && pnpm build && changelogen --release --push && pnpm publish" }, "dependencies": { "@nuxt/kit": "^3.8.1", @@ -44,6 +45,7 @@ "devDependencies": { "@jest/globals": "29.7.0", "@nuxt/eslint-config": "^0.2.0", + "changelogen": "^0.5.5", "eslint": "^8.53.0", "eslint-plugin-import": "^2.29.0", "eslint-plugin-jsdoc": "^46.8.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2df46fc3f..e91f4e33c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -48,6 +48,9 @@ importers: '@nuxt/eslint-config': specifier: ^0.2.0 version: 0.2.0(eslint@8.53.0) + changelogen: + specifier: ^0.5.5 + version: 0.5.5 eslint: specifier: ^8.53.0 version: 8.53.0