Publish #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
workflow_dispatch: | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Setup Docker buildx | |
uses: docker/[email protected] | |
- name: Load cached docker layers | |
uses: actions/[email protected] | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- name: Build publish_vite_plugin_vue_examples docker image | |
run: | | |
docker buildx build \ | |
--cache-from type=local,src=/tmp/.buildx-cache \ | |
--cache-to type=local,dest=/tmp/.buildx-cache-new,mode=max \ | |
--tag publish_vite_plugin_vue_examples \ | |
--load \ | |
. | |
# - name: Publish vite_plugin_vue_examples | |
# run: | | |
# docker run -e NPM_AUTH_TOKEN="${{ secrets.NPM_AUTH_TOKEN }}" publish_vite_plugin_vue_examples | |
- name: Tag published version | |
run: | | |
version=$(jq -r '.version' package.json) | |
git config --global user.name "Github Action" | |
git config --global user.email "" | |
git tag "v${version}" | |
- name: Prevent consistently growing buildx cache | |
run: | | |
rm -rf /tmp/.buildx-cache | |
mv /tmp/.buildx-cache-new /tmp/.buildx-cache |