Beta Release #9
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: Beta Release | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: "Beta 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}-beta.${{ 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 }} | |
beta-release: | |
runs-on: ubuntu-latest | |
needs: [create-tag, build-image] | |
steps: | |
- name: Create beta 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 }} |