Skip to content

build: fix wrong using php setup #368

build: fix wrong using php setup

build: fix wrong using php setup #368

Workflow file for this run

name: release
on:
push:
branches:
- main
jobs:
release:
name: Create draft release
permissions:
contents: write
pull-requests: write
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@ee9822ec2c397e8a364d634464339ac43a06e042 # v3
id: release
with:
command: manifest
rename:
name: Rename release title
permissions:
contents: write
runs-on: ubuntu-latest
needs: release
if: ${{ needs.release.outputs.release_created }}
env:
GH_REPO: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- run: |
gh release edit ${{ needs.release.outputs.tag_name }} \
--title "Release cli-kintone ${{ needs.release.outputs.tag_name }}"
upload:
name: Upload executables
permissions:
contents: write
runs-on: ubuntu-latest
needs: release
if: ${{ needs.release.outputs.release_created }}
steps:
- uses: jonabc/setup-licensed@d6b3a6f7058c2b40c06d205e13e15c2418977566 # renovate: tag=v1.1.4
with:
version: '3.x'
github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Install pnpm
uses: pnpm/action-setup@v2@v2
id: pnpm-install
with:
version: 8.6.5
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- run: pnpm build:artifacts
- name: Upload executables
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION=$(jq -r '.version' ./package.json)
gh release upload ${{ needs.release.outputs.tag_name }} \
${GITHUB_WORKSPACE}/artifacts/cli-kintone_v${VERSION}_linux.zip \
${GITHUB_WORKSPACE}/artifacts/cli-kintone_v${VERSION}_macos.zip \
${GITHUB_WORKSPACE}/artifacts/cli-kintone_v${VERSION}_win.zip
publish:
name: Publish release
permissions:
contents: write
runs-on: ubuntu-latest
needs: [release, rename, upload]
env:
GH_REPO: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- run: gh release edit ${{ needs.release.outputs.tag_name }} --draft=false