Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Commit

Permalink
actions(release): add more jobs and tasks for secman scoop bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
abdfnx committed Mar 19, 2022
1 parent 4f647b6 commit e27a38c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 7 deletions.
37 changes: 31 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,53 @@ jobs:
persist-credentials: false
fetch-depth: 0

- name: Set up `Go`
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17

- name: Setup `Node.js`
- name: Setup Node.js
uses: actions/setup-node@v2.5.0
with:
node-version: 16

- name: Set up `GoReleaser`

- name: Set up Tag
id: ghtag
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}

- name: Set up GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
install-only: true

- name: Set up `Task`
- name: Set up Task
uses: arduino/setup-task@v1

- name: Set up `Date`
- name: Set up Date
run: go run ./scripts/date.go >> date.txt

- name: Build
run: |
BuildDate="$(cat date.txt)" goreleaser release --rm-dist --timeout 100m
cd ./scripts/scoop
yarn
cd ../..
task scoop
- name: Commit files
env:
TAG: ${{ steps.ghtag.outputs.tag }}
run: |
cd ./scripts/scoop/tmp/scoop
git config --local user.email "${{ env.GITHUB_ACTIONS_EMAIL }}"
git config --local user.name "${{ env.GITHUB_ACTIONS_NAME }}"
git diff --cached
git add .
git commit -m "Scoop update for secman version ${TAG}"
- name: Push changes
uses: ad-m/github-push-action@master
with:
repository: "scmn-dev/scoop"
github_token: ${{ secrets.ACCESS_TOKEN }}
directory: ./scripts/scoop/tmp/scoop
2 changes: 1 addition & 1 deletion scripts/scoop/scoop-sm.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const { promisify } = require("util");
const { pipeline } = require("stream");

const VERSION_CMD = sh.exec("git describe --abbrev=0 --tags");
const VERSION = VERSION_CMD.replace(/\\n/g, "").replace("v", "");
const VERSION = VERSION_CMD.replace(/\n/g, "").replace("v", "");

const SECMAN_32BIT_URL = `https://github.com/scmn-dev/secman/releases/download/v${VERSION}/secman_windows_v${VERSION}_386.zip`;
const SECMAN_64BIT_URL = `https://github.com/scmn-dev/secman/releases/download/v${VERSION}/secman_windows_v${VERSION}_amd64.zip`;
Expand Down

0 comments on commit e27a38c

Please sign in to comment.