Skip to content

Alpha Release

Alpha Release #9

Workflow file for this run

name: Alpha Release
on:
workflow_dispatch:
inputs:
tag:
description: "Alpha version tag (1, 2, 3...)"
required: true
jobs:
create-tag:
runs-on: ubuntu-latest
outputs:
tagname: ${{ steps.get_tag.outputs.tagname }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get tag from package.json
id: get_tag
run: |
VERSION=$(cat package.json | jq -r '.version')
echo "tagname=v${VERSION}-alpha.${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
- uses: rickstaa/action-create-tag@v1
with:
tag: ${{ steps.get_tag.outputs.tagname }}
build-image:
needs: create-tag
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64, linux/arm64
push: true
tags: ghcr.io/${{ github.repository_owner }}/getashell:${{ needs.create-tag.outputs.tagname }}
alpha-release:
runs-on: ubuntu-latest
needs: [create-tag, build-image]
steps:
- name: Create alpha release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
prerelease: true
tag_name: ${{ needs.create-tag.outputs.tagname }}
name: ${{ needs.create-tag.outputs.tagname }}