Revert "adds route for indexes" #317
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: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
semantic-release: | |
name: Release | |
runs-on: ubuntu-20.04 | |
outputs: | |
new-release-published: ${{ steps.semantic-release.outputs.new_release_published }} | |
new-release-version: ${{ steps.semantic-release.outputs.new_release_version }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
- run: | | |
npm clean-install | |
npm run build | |
- id: semantic-release | |
uses: cycjimmy/semantic-release-action@v4 | |
with: | |
semantic_version: 18 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
upload: | |
name: Upload assets to GitHub Releases | |
needs: | |
- semantic-release | |
if: needs.semantic-release.outputs.new-release-published == 'true' | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
- name: Prepare release | |
run: | | |
npm clean-install | |
npm run pkg | |
mv bin/postgres-meta-linux postgres-meta | |
tar -czvf postgres-meta-${{ needs.semantic-release.outputs.new-release-version }}-x86_64-linux-gnu.tar.gz postgres-meta | |
mv bin/postgres-meta-macos postgres-meta | |
tar -czvf postgres-meta-${{ needs.semantic-release.outputs.new-release-version }}-x86_64-apple-darwin.tar.gz postgres-meta | |
mv bin/postgres-meta-win.exe postgres-meta.exe | |
tar -czvf postgres-meta-${{ needs.semantic-release.outputs.new-release-version }}-x86_64-pc-windows.tar.gz postgres-meta.exe | |
- uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: v${{ needs.semantic-release.outputs.new-release-version }} | |
files: postgres-meta-*.tar.gz | |
docker-hub: | |
name: Release on Docker Hub | |
needs: | |
- semantic-release | |
if: needs.semantic-release.outputs.new-release-published == 'true' | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write # This is required for requesting the JWT from AWS | |
contents: read | |
packages: write | |
steps: | |
- id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
supabase/postgres-meta | |
public.ecr.aws/supabase/postgres-meta | |
ghcr.io/supabase/postgres-meta | |
tags: | | |
type=raw,value=v${{ needs.semantic-release.outputs.new-release-version }} | |
- uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: amd64,arm64 | |
- uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: configure aws credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.PROD_AWS_ROLE }} | |
aws-region: us-east-1 | |
- name: Login to ECR | |
uses: docker/login-action@v3 | |
with: | |
registry: public.ecr.aws | |
- name: Login to GHCR | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: docker/build-push-action@v5 | |
with: | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
tags: ${{ steps.meta.outputs.tags }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |