diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml new file mode 100644 index 00000000..502c05f7 --- /dev/null +++ b/.github/actions/setup/action.yml @@ -0,0 +1,23 @@ +name: Setup +description: Setup Node.js and install dependencies +inputs: + node-version: + description: Node version + required: false + default: '24' + +runs: + using: composite + steps: + - name: Install pnpm + uses: pnpm/action-setup@v4.1.0 + + - name: Setup Node.js ${{ inputs.node-version }} + uses: actions/setup-node@v4.4.0 + with: + node-version: ${{ inputs.node-version }} + cache: pnpm + + - name: Install dependencies + run: pnpm install + shell: bash diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..de275097 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,38 @@ +name: Release & Publish to NPM & GitHub +on: + workflow_dispatch: + inputs: + increment: + description: 'Increment type: major, minor, patch, pre...' + required: true + type: choice + options: + - patch + - minor + - major + - prepatch + - preminor + - premajor + default: patch + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4.2.2 + - name: Setup + uses: ./.github/actions/setup + + - name: git config + run: | + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + - run: pnpm run release -- --increment ${{github.event.inputs.increment}} --ci --dry-run + env: + # For release-it + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_CONFIG_PROVENANCE: true + # For lerna-changelog + GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/size.yml b/.github/workflows/size.yml index 825083e9..4caec300 100644 --- a/.github/workflows/size.yml +++ b/.github/workflows/size.yml @@ -15,10 +15,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4.2.2 - - name: Setup Node.js - uses: actions/setup-node@v4.4.0 - - uses: pnpm/action-setup@v4.1.0 + - name: Setup + uses: ./.github/actions/setup - - uses: antfu/export-size-action@v1 + - name: Check size changes + uses: antfu/export-size-action@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e888a7b3..241604df 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,18 +16,15 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - node: [20, 22] + node: [22, 24] vue: [2, 3] steps: - name: Checkout uses: actions/checkout@v4.2.2 - - name: Setup Node.js ${{ matrix.node }} - uses: actions/setup-node@v4.4.0 + - name: Setup + uses: ./.github/actions/setup with: node-version: ${{ matrix.node }} - - uses: pnpm/action-setup@v4.1.0 - with: - run_install: true - name: Test run: pnpm test:${{ matrix.vue }} --coverage @@ -44,11 +41,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4.2.2 - - name: Setup Node.js - uses: actions/setup-node@v4.4.0 - - uses: pnpm/action-setup@v4.1.0 - with: - run_install: true + - name: Setup + uses: ./.github/actions/setup - name: Lint run: pnpm lint @@ -61,11 +55,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4.2.2 - - name: Setup Node.js - uses: actions/setup-node@v4.4.0 - - uses: pnpm/action-setup@v4.1.0 - with: - run_install: true + - name: Setup + uses: ./.github/actions/setup - name: Build run: pnpm build @@ -76,16 +67,16 @@ jobs: runs-on: ubuntu-latest name: Test build of example projects steps: - - name: Checkout fluent-vue + - name: Checkout uses: actions/checkout@v4.2.2 + - name: Setup + uses: ./.github/actions/setup + - name: Checkout examples uses: actions/checkout@v4.2.2 with: repository: fluent-vue/examples path: examples - - name: Setup Node.js - uses: actions/setup-node@v4.4.0 - - uses: pnpm/action-setup@v4.1.0 - name: Test run: node scripts/build-examples.mjs
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: