Bump @biz-dev-ops/web-components from 0.0.7 to 0.0.8 #483
Workflow file for this run
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: release | |
on: | |
pull_request: | |
types: [closed] | |
branches: [main] | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
environment: production | |
if: github.event.pull_request.merged | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: get package version | |
id: package_version | |
uses: Saionaro/[email protected] | |
- name: add v | |
id: version | |
run: echo "::set-output name=value::${{ format('v{0}', steps.package_version.outputs.version) }}" | |
- name: print package version | |
run: | | |
echo "package version: ${{ steps.version.outputs.value }}" | |
- name: get tag version | |
id: tag_version | |
uses: WyriHaximus/github-action-get-previous-tag@v1 | |
- name: print tag version | |
run: | | |
echo 'tag version: ${{ steps.tag_version.outputs.tag }}' | |
- name: push tag | |
if: ${{ steps.version.outputs.value != steps.tag_version.outputs.tag }} | |
run: | | |
git config user.name "${GITHUB_ACTOR}" | |
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
git tag -a "${{ steps.version.outputs.value}}" -m "${{ steps.version.outputs.value }}: PR #${{ github.event.pull_request.number }} ${{ github.event.pull_request.title }}" | |
git push origin "${{ steps.version.outputs.value}}" | |
- name: setup node.js | |
if: ${{ steps.version.outputs.value != steps.tag_version.outputs.tag }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: npm publish | |
if: ${{ steps.version.outputs.value != steps.tag_version.outputs.tag }} | |
run: | | |
npm ci | |
npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM }} | |
- name: change name | |
run: | | |
npm pkg set 'name'='@synion/md-docs' | |
- name: npm publish | |
if: ${{ steps.version.outputs.value != steps.tag_version.outputs.tag }} | |
run: | | |
npm ci | |
npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM }} | |
- name: build release notes | |
if: ${{ steps.version.outputs.value != steps.tag_version.outputs.tag }} | |
id: release_notes | |
uses: mikepenz/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: create release | |
if: ${{ steps.version.outputs.value != steps.tag_version.outputs.tag }} | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
tag_name: ${{ steps.version.outputs.value }} | |
title: '${{ steps.version.outputs.value }}: PR #${{ github.event.pull_request.number }} ${{ github.event.pull_request.title }}' | |
body: ${{steps.release_notes.outputs.changelog}} | |
# - name: Log in to the Container registry | |
# if: ${{ steps.version.outputs.value != steps.tag_version.outputs.tag }} | |
# uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | |
# with: | |
# registry: ${{ env.REGISTRY }} | |
# username: ${{ github.actor }} | |
# password: ${{ secrets.GITHUB_TOKEN }} | |
# - name: Extract metadata (tags, labels) for Docker | |
# if: ${{ steps.version.outputs.value != steps.tag_version.outputs.tag }} | |
# id: meta | |
# uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | |
# with: | |
# images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
# - name: Build and push Docker image | |
# if: ${{ steps.version.outputs.value != steps.tag_version.outputs.tag }} | |
# uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 | |
# with: | |
# context: . | |
# push: true | |
# tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.value }} | |
# labels: ${{ steps.meta.outputs.labels }} | |