mirror of
https://github.com/bybrooklyn/alchemist.git
synced 2026-04-18 09:53:33 -04:00
Improve runtime defaults and preserve job history
This commit is contained in:
25
.github/workflows/docker.yml
vendored
25
.github/workflows/docker.yml
vendored
@@ -38,6 +38,27 @@ jobs:
|
||||
id: image
|
||||
run: echo "name=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Compute release lane
|
||||
id: release_lane
|
||||
shell: bash
|
||||
run: |
|
||||
VERSION="${{ steps.version.outputs.version }}"
|
||||
IMAGE="${{ env.REGISTRY }}/${{ steps.image.outputs.name }}"
|
||||
if [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
{
|
||||
echo "tags<<EOF"
|
||||
echo "${IMAGE}:${VERSION}"
|
||||
echo "${IMAGE}:latest"
|
||||
echo "EOF"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
{
|
||||
echo "tags<<EOF"
|
||||
echo "${IMAGE}:${VERSION}"
|
||||
echo "EOF"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
@@ -57,9 +78,7 @@ jobs:
|
||||
context: .
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.REGISTRY }}/${{ steps.image.outputs.name }}:${{ steps.version.outputs.version }}
|
||||
${{ env.REGISTRY }}/${{ steps.image.outputs.name }}:latest
|
||||
tags: ${{ steps.release_lane.outputs.tags }}
|
||||
labels: |
|
||||
org.opencontainers.image.version=${{ steps.version.outputs.version }}
|
||||
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
|
||||
|
||||
58
.github/workflows/release.yml
vendored
58
.github/workflows/release.yml
vendored
@@ -26,6 +26,18 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Determine release channel
|
||||
id: release_channel
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "${GITHUB_REF_NAME}" == *-rc.* ]]; then
|
||||
echo "prerelease=true" >> "$GITHUB_OUTPUT"
|
||||
echo "make_latest=false" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "prerelease=false" >> "$GITHUB_OUTPUT"
|
||||
echo "make_latest=true" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
# Use bundled Bun (installed via npm or setup-bun) to build frontend
|
||||
- name: Install Bun
|
||||
@@ -59,11 +71,13 @@ jobs:
|
||||
cp target/${{ matrix.target }}/release/alchemist.exe alchemist-${{ matrix.target_name }}.exe
|
||||
|
||||
- name: Upload Release Assets
|
||||
uses: softprops/action-gh-release@v1
|
||||
uses: softprops/action-gh-release@v2
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
files: |
|
||||
alchemist-${{ matrix.target_name }}.exe
|
||||
prerelease: ${{ steps.release_channel.outputs.prerelease }}
|
||||
make_latest: ${{ steps.release_channel.outputs.make_latest }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -86,6 +100,24 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Determine release channel
|
||||
id: release_channel
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "${GITHUB_REF_NAME}" == *-rc.* ]]; then
|
||||
echo "prerelease=true" >> "$GITHUB_OUTPUT"
|
||||
echo "make_latest=false" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "prerelease=false" >> "$GITHUB_OUTPUT"
|
||||
echo "make_latest=true" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Read app version
|
||||
id: app_version
|
||||
shell: bash
|
||||
run: |
|
||||
echo "value=$(grep -m1 '^version = ' Cargo.toml | cut -d'\"' -f2)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Install Bun
|
||||
uses: oven-sh/setup-bun@v1
|
||||
with:
|
||||
@@ -128,9 +160,9 @@ jobs:
|
||||
<key>CFBundleName</key>
|
||||
<string>$APP_NAME</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${{ github.ref_name }}</string>
|
||||
<string>${{ steps.app_version.outputs.value }}</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${{ github.ref_name }}</string>
|
||||
<string>${{ steps.app_version.outputs.value }}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
@@ -149,10 +181,12 @@ jobs:
|
||||
ditto -c -k --keepParent "$APP_DIR" "alchemist-macos-${{ matrix.target_name }}.zip"
|
||||
|
||||
- name: Upload Release Assets
|
||||
uses: softprops/action-gh-release@v1
|
||||
uses: softprops/action-gh-release@v2
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
files: alchemist-macos-${{ matrix.target_name }}.zip
|
||||
prerelease: ${{ steps.release_channel.outputs.prerelease }}
|
||||
make_latest: ${{ steps.release_channel.outputs.make_latest }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -166,6 +200,18 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Determine release channel
|
||||
id: release_channel
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "${GITHUB_REF_NAME}" == *-rc.* ]]; then
|
||||
echo "prerelease=true" >> "$GITHUB_OUTPUT"
|
||||
echo "make_latest=false" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "prerelease=false" >> "$GITHUB_OUTPUT"
|
||||
echo "make_latest=true" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Install Bun
|
||||
uses: oven-sh/setup-bun@v1
|
||||
with:
|
||||
@@ -223,9 +269,11 @@ jobs:
|
||||
mv Alchemist*.AppImage alchemist-linux-x86_64.AppImage
|
||||
|
||||
- name: Upload Release Assets
|
||||
uses: softprops/action-gh-release@v1
|
||||
uses: softprops/action-gh-release@v2
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
files: alchemist-linux-x86_64.AppImage
|
||||
prerelease: ${{ steps.release_channel.outputs.prerelease }}
|
||||
make_latest: ${{ steps.release_channel.outputs.make_latest }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user