From 89f86e9fe6780d83cf4fbbc29bcbcaba0b3b4f56 Mon Sep 17 00:00:00 2001 From: Alexander Baryshnikov Date: Thu, 10 Sep 2020 18:26:22 +0800 Subject: [PATCH] build: add ci for tag --- .github/FUNDING.yml | 12 ++++++++++++ .github/workflows/go.yml | 40 ++++++++++++++++++++++++++++++++++++++++ _footer.md | 30 ++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 .github/FUNDING.yml create mode 100644 .github/workflows/go.yml create mode 100644 _footer.md diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..42850c9 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: ['http://reddec.net/about/#donate'] diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..b54670d --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,40 @@ +name: Build project +on: + push: + tags: + - 'v*' +jobs: + + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Set up Go 1.15 + uses: actions/setup-go@v1 + with: + go-version: '^1.15' + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + with: + lfs: true + fetch-depth: 0 + - name: Checkout LFS objects + run: git lfs checkout + + - name: Pull tag + run: git fetch --tags + - uses: azure/docker-login@v1 + with: + username: 'reddec' + password: ${{ secrets.DOCKERIO_PASSWORD }} + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: release --rm-dist --release-footer _footer.md + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + UPLOAD_BINTRAY_SECRET: ${{ secrets.UPLOAD_BINTRAY_SECRET }} \ No newline at end of file diff --git a/_footer.md b/_footer.md new file mode 100644 index 0000000..e8a61ff --- /dev/null +++ b/_footer.md @@ -0,0 +1,30 @@ +For Ubuntu/Debian (should be for all LTS) + +```bash +sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 379CE192D401AB61 +echo "deb https://dl.bintray.com/reddec/debian all main" | sudo tee /etc/apt/sources.list.d/reddec.list +sudo apt update +sudo apt install nano-run +``` + +Ansible snippet + +```yaml +- name: Add an apt key by id from a keyserver + become: yes + apt_key: + keyserver: keyserver.ubuntu.com + id: 379CE192D401AB61 +- name: Add repository + become: yes + apt_repository: + repo: deb https://dl.bintray.com/reddec/debian all main + state: present + filename: reddec +- name: Install nano-run + become: yes + apt: + name: nano-run + update_cache: yes + state: latest +``` \ No newline at end of file