-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b73d6ea
commit 92fbe67
Showing
5 changed files
with
194 additions
and
443 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: CI | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: install software | ||
run: | | ||
sudo apt-get -qq install llvm srecord | ||
ls -lt /usr/bin/llvm-objcopy* | ||
wget --quiet --output-document=- https://github.com/github/hub/releases/download/v2.12.3/hub-linux-amd64-2.12.3.tgz | tar zx | ||
mv hub-linux-* hub | ||
./hub/bin/hub --version | ||
ZIG=$(wget --quiet --output-document=- https://ziglang.org/download/index.json | jq --raw-output '.master."x86_64-linux".tarball') | ||
wget --quiet --output-document=- $ZIG | tar Jx | ||
mv zig-linux-x86_64-* zig | ||
echo zig version $(./zig/zig version) | ||
- name: build | ||
run: | | ||
export PATH=./zig:$PATH | ||
./build.sh | ||
mkdir release | ||
cp main.hex release | ||
- name: release draft | ||
env: | ||
GITHUB_USER: $GITHUB_ACTOR | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
REPO=$(basename $GITHUB_REPOSITORY) | ||
RELEASE_TAG=$(grep '^const release_tag =' main.zig | sed 's/";//' | sed 's/^.*"//') | ||
RELEASE_ASSET=$REPO-$RELEASE_TAG.zip | ||
pushd release | ||
echo $RELEASE_TAG > RELEASE.md | ||
echo >> RELEASE.md | ||
cat ../release-message.md >> RELEASE.md | ||
zip -r $RELEASE_ASSET . | ||
../hub/bin/hub release create --draft --prerelease --file RELEASE.md --attach $RELEASE_ASSET $RELEASE_TAG | ||
popd |
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
Oops, something went wrong.