name: Release Packages on: push: tags: - 'v*' jobs: pre-build: if: github.repository == 'lucide-icons/lucide' runs-on: ubuntu-latest outputs: VERSION: ${{ steps.get_version.outputs.VERSION }} YARN_CACHE_DIR: ${{ steps.yarn_cache.outputs.YARN_CACHE_DIR }} steps: - name: Get the version id: get_version run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/\v} - name: Get yarn cache directory path id: yarn_cache run: echo "::set-output name=YARN_CACHE_DIR::$(yarn cache dir)" lucide: if: github.repository == 'lucide-icons/lucide' runs-on: ubuntu-latest needs: pre-build steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: node-version: '12.x' - uses: actions/cache@v2 id: yarn-cache with: path: ${{ needs.pre-build.outputs.YARN_CACHE_DIR }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - name: Install dependencies if: steps.yarn-cache.outputs.cache-hit != 'true' run: yarn --pure-lockfile - name: Set Auth Token run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }} - name: Set new version run: yarn workspace lucide version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version - name: Build run: yarn workspace lucide build - name: Test run: yarn workspace lucide test - name: Publish run: yarn workspace lucide publish - name: Commit package.json run: | git add packages/lucide/package.json git -c user.name="Lucide Bot" -c user.email="lucide-bot@users.noreply.github.com" \ commit -m ":package: Bump version lucide to ${{ needs.pre-build.outputs.VERSION }}" --no-verify --quiet git remote set-url --push origin https://lucide-bot:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY.git git push origin HEAD:master lucide-react: if: github.repository == 'lucide-icons/lucide' runs-on: ubuntu-latest needs: pre-build steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: node-version: '12.x' - uses: actions/cache@v2 id: yarn-cache with: path: ${{ needs.pre-build.outputs.YARN_CACHE_DIR }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - name: Install dependencies if: steps.yarn-cache.outputs.cache-hit != 'true' run: yarn --pure-lockfile - name: Set Auth Token run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }} - name: Set package.json version lucide run: yarn workspace lucide-react version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version - name: Build run: yarn workspace lucide-react build - name: Test run: yarn workspace lucide-react test - name: Publish run: yarn workspace lucide-react publish - name: Commit package.json run: | git add packages/lucide-react/package.json git -c user.name="Lucide Bot" -c user.email="lucide-bot@users.noreply.github.com" \ commit -m ":package: Bump version lucide-react to ${{ needs.pre-build.outputs.VERSION }}" --no-verify --quiet git remote set-url --push origin https://lucide-bot:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY.git git push origin HEAD:master lucide-vue: if: github.repository == 'lucide-icons/lucide' runs-on: ubuntu-latest needs: pre-build steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: node-version: '12.x' - uses: actions/cache@v2 id: yarn-cache with: path: ${{ needs.pre-build.outputs.YARN_CACHE_DIR }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - name: Install dependencies if: steps.yarn-cache.outputs.cache-hit != 'true' run: yarn --pure-lockfile - name: Set Auth Token run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }} - name: Set new version run: yarn workspace lucide-vue version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version - name: Build run: yarn workspace lucide-vue build - name: Test run: yarn workspace lucide-vue test - name: Publish run: yarn workspace lucide-vue publish - name: Commit package.json run: | git add packages/lucide-vue/package.json git -c user.name="Lucide Bot" -c user.email="lucide-bot@users.noreply.github.com" \ commit -m ":package: Bump version lucide-vue to ${{ needs.pre-build.outputs.VERSION }}" --no-verify --quiet git remote set-url --push origin https://lucide-bot:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY.git git push origin HEAD:master