Merge pull request #230 from mattwebbio/release-please--branches--mas… #1
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: Perform Release | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: 'arm64,arm' | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: mattwebbio | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Generate tags | |
id: docker_tags | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
mattwebbio/orbital-sync | |
ghcr.io/mattwebbio/orbital-sync | |
tags: | | |
type=schedule | |
type=ref,event=branch | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=semver,pattern={{major}} | |
type=sha | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.docker_tags.outputs.tags }} | |
labels: ${{ steps.docker_tags.outputs.labels }} | |
platforms: | | |
linux/amd64 | |
linux/arm64 | |
linux/arm | |
- name: Update DockerHub description | |
uses: peter-evans/dockerhub-description@v4 | |
with: | |
username: mattwebbio | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
npm: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '18.x' | |
- run: yarn | |
- run: yarn tsc | |
- run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc | |
- run: yarn publish --registry https://npm.pkg.github.com | |
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | |
- run: yarn publish --registry https://registry.npmjs.org |