Skip to content

Publish v0.1.3

Publish v0.1.3 #5

Workflow file for this run

---
name: Publish
run-name: Publish ${{ github.ref_name }}
on:
push:
tags:
- v*
jobs:
build:
name: Build
uses: ./.github/workflows/_build.yml
release:
name: GitHub Releases
runs-on: ubuntu-latest
timeout-minutes: 30
needs: build
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: ${{ needs.build.outputs.artifact_name }}
path: .
- name: Create GitHub release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GH_TOKEN }}
fail_on_unmatched_files: true
prerelease: ${{ contains(github.ref_name, '-') }}
files: '*.tgz'
npm:
name: npm
uses: ./.github/workflows/_publish.yml
needs: build
with:
artifact_name: ${{ needs.build.outputs.artifact_name }}
registry_host: https://registry.npmjs.org
secrets:
registry_token: ${{ secrets.NPM_TOKEN }}
github:
name: GitHub Packages
uses: ./.github/workflows/_publish.yml
permissions:
contents: read
packages: write
needs: build
with:
artifact_name: ${{ needs.build.outputs.artifact_name }}
registry_host: https://npm.pkg.github.com
secrets:
registry_token: ${{ secrets.GITHUB_TOKEN }}
ghcr:
name: GitHub Container Registry
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }}
- name: Setup Docker
uses: ./.github/actions/setup-docker
with:
registry_domain: ghcr.io
registry_username: ${{ secrets.GH_USER }}
registry_password: ${{ secrets.GH_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}