Skip to content

Commit

Permalink
ci: re-enable github releases
Browse files Browse the repository at this point in the history
  • Loading branch information
cilki committed May 17, 2024
1 parent 21f3700 commit c43e2fb
Showing 1 changed file with 23 additions and 28 deletions.
51 changes: 23 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,27 @@ on:
- master

jobs:
# github:
# runs-on: ubuntu-latest
# if: "contains(github.event.head_commit.message, 'chore: release')"
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - uses: dtolnay/rust-toolchain@stable
# - uses: MarcoIeni/[email protected]
# with:
# command: release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
github:
runs-on: ubuntu-latest
if: "contains(github.event.head_commit.message, 'chore: release')"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: dtolnay/rust-toolchain@stable

- uses: MarcoIeni/[email protected]
with:
command: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

linux:
name: linux / ${{ matrix.target }}
runs-on: ubuntu-latest
# needs: github
needs: github
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -70,7 +72,7 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
run: |
for tag in goldboot-v0.0.5 $(git tag --points-at HEAD); do
for tag in $(git tag --points-at HEAD); do
if cp target/${{ matrix.target }}/release/${tag%-*} ${tag%-*}_${{ matrix.target }}; then
gh release upload "${tag}" "${tag%-*}_${{ matrix.target }}"
fi
Expand All @@ -83,14 +85,14 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: goldboot-x86_64-unknown-linux-musl
path: goldboot/linux-amd64
path: linux-amd64

- name: Build goldboot-linux image x86_64
run: |
export RUST_BACKTRACE=1
export RUST_LOG=debug
goldboot/linux-amd64 init --mold Goldboot
goldboot/linux-amd64 cast --output goldboot-linux-x86_64.gb .
linux-amd64/goldboot init --mold Goldboot
linux-amd64/goldboot cast --output goldboot-linux-x86_64.gb .
- uses: actions/upload-artifact@v4
with:
Expand All @@ -99,7 +101,7 @@ jobs:

macos:
runs-on: macos-latest
# needs: github
needs: github
steps:
- uses: actions-rs/toolchain@v1
with:
Expand All @@ -120,7 +122,7 @@ jobs:

windows:
runs-on: windows-latest
# needs: github
needs: github
steps:
- uses: actions-rs/toolchain@v1
with:
Expand Down Expand Up @@ -187,13 +189,6 @@ jobs:
push: true
tags: fossable/goldboot-registry:latest,fossable/goldboot-registry:${{ steps.get_tags.outputs.goldboot-registry }}

# - uses: docker/build-push-action@v5
# with:
# context: goldboot-registry
# platforms: linux/amd64,linux/arm64 #,linux/arm/v7
# push: true
# tags: fossable/goldboot-registry:latest

- uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
Expand Down

0 comments on commit c43e2fb

Please sign in to comment.