mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Create source code packages by adding release tags
According to the [GitHub blog](https://github.blog/2023-02-21-update-on-the-future-stability-of-source-code-archives-and-hashes/), files by `git archive` are not guaranteed to have checksum persistence. It is also stated that the archive file at this time is stable in bytes, but that this may change in the future.
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
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"
|
||||
sha256sum * > .sha256
|
||||
mv .sha256 "$packagename.sha256"
|
||||
)
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
# draft: true
|
||||
prerelease: ${{ contains(github.ref_name, '-rc') }}
|
||||
body_path: NEWS
|
||||
files: packages/*
|
||||
Reference in New Issue
Block a user