diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 072118298..9e7b75052 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,16 @@ on: version: description: Version required: true + tag: + required: true + description: NPM tag + default: 'latest' + type: choice + options: + - latest + - next + - beta + - alpha permissions: id-token: write # Required for OIDC @@ -79,9 +89,11 @@ jobs: with: version: ${{ needs.create-release.outputs.VERSION }} + dispatch-release: if: github.event_name == 'workflow_dispatch' uses: './.github/workflows/release.yml' secrets: inherit with: version: ${{ inputs.version }} + tag: ${{ inputs.tag }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e1798f55c..fffc87d62 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,6 +11,10 @@ on: required: true description: Version type: string + tag: + description: NPM tag + default: 'latest' + type: string permissions: id-token: write # Required for OIDC @@ -20,7 +24,7 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} jobs: - pre-release: + prepare: if: github.repository == 'lucide-icons/lucide' && contains('["ericfennis", "karsa-mistmere", "jguddas"]', github.actor) runs-on: ubuntu-latest outputs: @@ -38,7 +42,7 @@ jobs: release: if: github.repository == 'lucide-icons/lucide' runs-on: ubuntu-latest - needs: pre-release + needs: prepare permissions: id-token: write # Required for OIDC contents: read @@ -50,7 +54,7 @@ jobs: 'lucide', 'lucide-react', 'lucide-react-native', - 'lucide-vue-next', + # 'lucide-vue-next', 'lucide-angular', 'lucide-preact', 'lucide-solid', @@ -72,7 +76,7 @@ jobs: run: pnpm install --frozen-lockfile - name: Set new version - run: pnpm --filter ${{ matrix.package }} version --new-version ${{ needs.pre-release.outputs.VERSION }} --no-git-tag-version + run: pnpm --filter ${{ matrix.package }} version --new-version ${{ needs.prepare.outputs.VERSION }} --no-git-tag-version - name: Build run: pnpm --filter ${{ matrix.package }} build @@ -81,14 +85,14 @@ jobs: run: pnpm --filter ${{ matrix.package }} test - name: Publish - run: pnpm --filter ${{ matrix.package }} publish --access public --no-git-checks --ignore-scripts + run: pnpm --filter ${{ matrix.package }} publish --access public --no-git-checks --ignore-scripts --tag ${{ inputs.tag }} env: NPM_CONFIG_PROVENANCE: true lucide-static: if: github.repository == 'lucide-icons/lucide' runs-on: ubuntu-latest - needs: [pre-release, lucide-font] + needs: [prepare, lucide-font] permissions: id-token: write # Required for OIDC contents: read @@ -106,7 +110,7 @@ jobs: run: pnpm install --frozen-lockfile - name: Set new version - run: pnpm --filter lucide-static version --new-version ${{ needs.pre-release.outputs.VERSION }} --no-git-tag-version + run: pnpm --filter lucide-static version --new-version ${{ needs.prepare.outputs.VERSION }} --no-git-tag-version - name: Move Font run: cp -r lucide-font packages/lucide-static/font @@ -122,7 +126,7 @@ jobs: lucide-font: if: github.repository == 'lucide-icons/lucide' runs-on: ubuntu-latest - needs: pre-release + needs: prepare steps: - uses: actions/checkout@v6 - uses: pnpm/action-setup@v4 @@ -148,7 +152,7 @@ jobs: post-release: if: github.repository == 'lucide-icons/lucide' runs-on: ubuntu-latest - needs: [pre-release, lucide-font] + needs: [prepare, lucide-font] permissions: id-token: write # Required for OIDC contents: write @@ -157,13 +161,13 @@ jobs: - uses: actions/download-artifact@v4 - name: Zip font and icons run: | - zip -r lucide-font-${{ needs.pre-release.outputs.VERSION }}.zip lucide-font - zip -r lucide-icons-${{ needs.pre-release.outputs.VERSION }}.zip icons + zip -r lucide-font-${{ needs.prepare.outputs.VERSION }}.zip lucide-font + zip -r lucide-icons-${{ needs.prepare.outputs.VERSION }}.zip icons - name: Release zip and fonts uses: softprops/action-gh-release@v2 with: - tag_name: ${{ needs.pre-release.outputs.VERSION }} + tag_name: ${{ needs.prepare.outputs.VERSION }} files: | - lucide-font-${{ needs.pre-release.outputs.VERSION }}.zip - lucide-icons-${{ needs.pre-release.outputs.VERSION }}.zip + lucide-font-${{ needs.prepare.outputs.VERSION }}.zip + lucide-icons-${{ needs.prepare.outputs.VERSION }}.zip