mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
af1e33c442
This is to allow final confirmation of the created release file. Release files in draft form cannot be downloaded by the general public.
47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
name: Release Builds
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "*.*.*"
|
|
|
|
permissions: read-all
|
|
|
|
jobs:
|
|
source:
|
|
name: Source Code Releasing
|
|
if: ${{ github.repository == 'mruby/mruby' }}
|
|
permissions:
|
|
contents: write
|
|
runs-on: ubuntu-22.04
|
|
timeout-minutes: 10
|
|
strategy:
|
|
fail-fast: false
|
|
steps:
|
|
- name: "Checkout ${{ github.ref_name }} ( ${{ github.sha }} )"
|
|
uses: actions/checkout@v4
|
|
- name: Builds
|
|
id: builds
|
|
run: |
|
|
tagname="$GITHUB_REF_NAME"
|
|
packagename="mruby-$tagname"
|
|
destdir=packages
|
|
|
|
mkdir -p "$destdir"
|
|
git archive --format zip --prefix "$packagename/" -o "$destdir/$packagename.zip" "$GITHUB_REF"
|
|
git archive --format tar.gz --prefix "$packagename/" -o "$destdir/$packagename.tar.gz" "$GITHUB_REF"
|
|
gunzip -c "$destdir/$packagename.tar.gz" | xz > "$destdir/$packagename.tar.xz"
|
|
|
|
(
|
|
cd "$destdir" || exit
|
|
sha256sum -- * > .sha256
|
|
mv .sha256 "$packagename.sha256"
|
|
)
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
draft: true
|
|
prerelease: ${{ contains(github.ref_name, '-rc') }}
|
|
body_path: NEWS
|
|
files: packages/*
|