chore(release): 2.5.2 #44
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: CD | |
on: | |
push: | |
tags: | |
- 'v*' | |
permissions: | |
contents: write | |
jobs: | |
release: | |
name: 🐙 Generate new release | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: ⬇️ Checkout project | |
uses: actions/checkout@v3 | |
- name: 📋 Build Changelog | |
run: npx extract-changelog-release > RELEASE_BODY.md | |
- name: 🍻 Build and generate new release | |
uses: softprops/action-gh-release@v1 | |
with: | |
body_path: RELEASE_BODY.md | |
token: ${{ secrets.GITHUB_TOKEN }} | |
distribute: | |
name: 🛩️ Deliver project | |
runs-on: ubuntu-latest | |
needs: release | |
steps: | |
- name: ⬇️ Checkout project | |
uses: actions/checkout@v3 | |
- name: 💻 Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: 🏷️ Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: borjapazr/express-typescript-skeleton | |
- name: 💽 Build and push Docker image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: docker/Dockerfile | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
redeploy: | |
name: 🔄 Redeploy webhook call | |
runs-on: ubuntu-latest | |
needs: distribute | |
steps: | |
- name: 🚀 Deploy Express Typescript Skeleton webhook | |
uses: joelwmale/webhook-action@master | |
env: | |
WEBHOOK_URL: ${{ secrets.REDEPLOY_WEBHOOK_URL }} |