Skip to content

Release

Release #13

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
version:
description: "Next Version"
required: true
env:
IMAGE_NAME: ghcr.io/bitvavo/bootcamp-slack-app
permissions:
contents: write
packages: write
jobs:
release:
runs-on: ubuntu-latest-4core
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ env.IMAGE_NAME }}:v${{ github.event.inputs.version }}
- name: Set author in Git
run: |
git config user.name github-actions
git config user.email github-actions@github.com
- name: Change version
run: |
mv deno.json deno.json.bak
jq '.version = "${{ github.event.inputs.version }}"' deno.json.bak > deno.json
- name: Commit version change
run: |
git add deno.json
git commit -m "${{ github.event.inputs.version }}"
git tag "v${{ github.event.inputs.version }}"
- name: Push release commit
run: |
git push --tags origin ${{ github.ref_name }}
- uses: ncipollo/release-action@v1
with:
tag: v${{ github.event.inputs.version }}
draft: true