diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index c47b267..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: docker-install CI - -on: [push, pull_request] - -jobs: - test: - runs-on: ubuntu-latest - timeout-minutes: 5 - strategy: - matrix: - os: - - ubuntu:18.04 - - centos:7 - version: - - 19.03 - - "" - - steps: - - uses: actions/checkout@v2 - - name: Shellcheck - run: make shellcheck - - name: Check distribution - run: TEST_IMAGE=${{ matrix.os }} VERSION=${{ matrix.version }} make test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..cf0b7ef --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,65 @@ +# GitHub Action Workflow +# this creates a tag release whenever a tag is created +name: release + +on: [push, repository_dispatch] + +jobs: + publish: + name: Publish for ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - os: ubuntu-latest + asset_name: foundryup + artifact_name: install + archive_ext: .* + steps: + - uses: actions/checkout@v2 + with: + submodules: 'recursive' + persist-credentials: false + + - name: Install packages (ubuntu-latest) + if: matrix.os == 'ubuntu-latest' + shell: bash + run: | + rm -rf build/ || { exit 1 && echo "[FAIL]: build dir"; } + make + bash build/install + + + - name: Archive release assets + if: matrix.os != 'windows-latest' + id: archive_release_assets_unix_like + shell: bash + run: | + make + cp build/${{ matrix.artifact_name }} ${{ matrix.asset_name }} + tar -czvf ${{ matrix.asset_name }}${{ matrix.archive_ext }} ${{ matrix.asset_name }} + + - name: Generate SHA256 checksum for binary + if: matrix.os != 'windows-latest' + id: checksum_archive_unix_like + shell: bash + run: | + sha256sum ${{ matrix.asset_name }}${{ matrix.archive_ext }} > ${{ matrix.asset_name }}${{ matrix.archive_ext }}.sha256 + - name: Upload binary to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ matrix.asset_name }}${{ matrix.archive_ext }} + asset_name: ${{ matrix.asset_name }}${{ matrix.archive_ext }} + tag: ${{ github.ref }} + overwrite: true + + - name: Upload SHA256 checksum to release + if: matrix.os != 'windows-latest' + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ matrix.asset_name }}${{ matrix.archive_ext }}.sha256 + asset_name: ${{ matrix.asset_name }}${{ matrix.archive_ext }}.sha256 + tag: ${{ github.ref }} + overwrite: true diff --git a/README.md b/README.md new file mode 100644 index 0000000..ad28247 --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# `foundryup.secured` + +[![release](https://github.com/sambacha/foundryup-tests/actions/workflows/release.yml/badge.svg)](https://github.com/sambacha/foundryup-tests/actions/workflows/release.yml) + +--- + +## Overview + +* CI process for automating hash commit for verifying and versioning shell install script +* `Makefile` +* CD for creating release dist + +## License + +ISC