add github workflows

This commit is contained in:
yuk7
2021-07-04 00:47:30 +09:00
parent 81c13415a7
commit cac51a5215
4 changed files with 122 additions and 32 deletions

40
.github/workflows/build-zip.yaml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: Build Zip CI
on:
push:
branches: [ 'main' ]
pull_request:
branches: [ 'main' ]
jobs:
Build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@main
- name: Install dependencies for build (Apt)
shell: bash
run: |
sudo env DEBIAN_FRONTEND=noninteractive apt update -y && \
sudo env DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends libarchive-tools curl jq tree
- name: Build Zip x64
shell: bash
env:
ARCH: 'x64'
OUT_ZIP: 'Alpine.zip'
run: make -e && tree
- name: Build Zip ARM64
shell: bash
env:
ARCH: 'arm64'
OUT_ZIP: 'Alpine_arm64.zip'
run: make -e && tree
- name: Upload a Build Artifact x64
uses: actions/upload-artifact@main
with:
name: Alpine.zip
path: ./Alpine.zip
- name: Upload a Build Artifact ARM64
uses: actions/upload-artifact@main
with:
name: Alpine_arm64.zip
path: ./Alpine_arm64.zip

82
.github/workflows/release-zip.yaml vendored Normal file
View File

@@ -0,0 +1,82 @@
name: Release Zip CI
on:
push:
tags:
- "*.*.*.*"
jobs:
Build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@main
- name: Install dependencies for build (Apt)
shell: bash
run: |
sudo env DEBIAN_FRONTEND=noninteractive apt update -y && \
sudo env DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends libarchive-tools curl jq tree
- name: Build Zip x64
shell: bash
env:
ARCH: 'x64'
OUT_ZIP: 'Alpine.zip'
run: make -e && tree
- name: Build Zip ARM64
shell: bash
env:
ARCH: 'arm64'
OUT_ZIP: 'Alpine_arm64.zip'
run: make -e && tree
- name: Upload a Build Artifact x64
uses: actions/upload-artifact@main
with:
name: Alpine.zip
path: ./Alpine.zip
- name: Upload a Build Artifact ARM64
uses: actions/upload-artifact@main
with:
name: Alpine_arm64.zip
path: ./Alpine_arm64.zip
Release:
needs: [Build]
runs-on: ubuntu-20.04
steps:
- name: Download Build Artifact x64
uses: actions/download-artifact@main
with:
name: Alpine.zip
- name: Download Build Artifact arm64
uses: actions/download-artifact@main
with:
name: Alpine_arm64.zip
- name: Create release
id: create_release
uses: actions/create-release@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset x64
id: upload-release-asset
uses: actions/upload-release-asset@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: Alpine.zip
asset_name: Alpine.zip
asset_content_type: application/zip
- name: Upload Release Asset arm64
id: upload-release-asset
uses: actions/upload-release-asset@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: Alpine_arm64.zip
asset_name: Alpine_arm64.zip
asset_content_type: application/zip

View File

@@ -1,21 +0,0 @@
sudo: required
dist: trusty
group: deprecated-2017Q4
language: bash
before_script:
- sudo apt-get update -qq
- sudo apt-get install make curl bsdtar check -qq
script:
- make
notifications:
email: false
deploy:
provider: releases
api_key:
secure: tZnc2JaFaV2KUHWf4csEyOwU2RFj+4qE3QNuSs6FORCoSGu01XJtSf/U+4vjhFUVEwid1KccFCGXXtwc5ZcchE0QAruzzHzvzIXTeeTU4DjalP7CDogFCcqOxklO3v/abCyCdhVInXPl0hZyOqLIuY94QPkjxmYbZu93oytH1XH/lOtmXQ+lLbnPhGXX/K59O5EpWAwQ7OtE1IQ+W04kjqx5tF6LTSvrUQ+oIEKkIVAaparZc4v/ME0C7LGprPas27rw85BchLr7/adtVu67DJiEJ7FzG5oVpJQx/eXKce2P5T5SloRdB20kTHNwOR3+6UOCoAtHS5HYX85n+iToRdGGZUQGDIPlgCXyAMfadGZ3YUnA6cYbjPG04u80plYcMS7qSOX8603bDZn2BZtgFB6h53Ix+GJCfhiFsEBjjTI2lVcI6DjtBEYpfWCTCZN/Vgpzpi57w/V2xX2n0QJ8YOqZwwOnWypdk/tjMqOcNDX30Rype4N+XEo3NkzyVMpjdGCwvClGU/WAs9jVTu9fdAfBGfzmGFWiYuV64opEw2buXNIamZdJd4Eb4OFzlGng4h1UvRQDHCGG80MgPlwoGV2/IqLvF3bQMmCWtPDmH+Cmo7wMQPv6r/MpT7gRWSMZPDCzFyChwwnNOkVNJjIRqv3eT/+LX1R1vv4tFDE5NVc=
file: Alpine.zip
on:
repo: yuk7/AlpineWSL
tags: true
all_branches: true
skip_cleanup: true

11
profile
View File

@@ -1,11 +0,0 @@
export CHARSET=UTF-8
export LANG=C.UTF-8
export PAGER=less
export PS1='\h:\w\$ '
umask 022
for script in /etc/profile.d/*.sh ; do
if [ -r $script ] ; then
. $script
fi
done