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

Commit 9020813

Browse files
committed
actions(release): fix release action and add new steps, add new tasks
1 parent 34c60c0 commit 9020813

File tree

2 files changed

+37
-5
lines changed

2 files changed

+37
-5
lines changed

.github/workflows/release.yml

+25-4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77

88
env:
99
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
10+
GITHUB_ACTIONS_NAME: "github-actions[bot]"
11+
GITHUB_ACTIONS_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com"
1012

1113
permissions: write-all
1214

@@ -38,18 +40,37 @@ jobs:
3840
with:
3941
install-only: true
4042

41-
- name: Set up Date
43+
- name: Set up Build Info
4244
run: task setup
4345

46+
- name: Set up Tag
47+
id: ghtag
48+
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
49+
4450
- name: Build
51+
env:
52+
TAG: ${{ steps.ghtag.outputs.tag }}
4553
run: |
46-
yarn
47-
BuildDate="$(cat date.txt)" goreleaser release --rm-dist --timeout 100m
54+
task release
55+
task upload-scoop-manifes
56+
cd ./scoop
57+
git config --local user.email "${{ env.GITHUB_ACTIONS_EMAIL }}"
58+
git config --local user.name "${{ env.GITHUB_ACTIONS_NAME }}"
59+
git diff --cached
60+
git add .
61+
git commit -m "Scoop update for secman version ${TAG}"
62+
63+
- name: Push changes
64+
uses: ad-m/github-push-action@master
65+
with:
66+
repository: "scmn-dev/scoop"
67+
github_token: ${{ secrets.ACCESS_TOKEN }}
68+
directory: ./scoop
4869

4970
- name: Build SMUI
5071
run: task build-smui
5172

5273
- name: Upload SMUI
5374
uses: softprops/action-gh-release@v1
5475
with:
55-
files: smui.zip
76+
files: hub/smui.zip

Taskfile.yaml

+12-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ tasks:
3131
cmds:
3232
- sudo mv secman "{{ .SECMAN_UNIX_PATH }}"
3333

34+
release:
35+
cmds:
36+
- BuildDate="$(cat date.txt)" goreleaser release --rm-dist --timeout 100m
37+
3438
build:
3539
cmds:
3640
- task: setup
@@ -49,7 +53,7 @@ tasks:
4953
- task: setup
5054
- yarn build
5155
- mv dist ui
52-
- cp tag.txt ui
56+
- cp ../tag.txt ui
5357
- zip -9 -r smui.zip ui
5458

5559
link-scc:
@@ -77,3 +81,10 @@ tasks:
7781
- task: build-scc
7882
- task: link-scc
7983
- task: install
84+
85+
upload-scoop-manifest:
86+
cmds:
87+
- git clone https://github.com/scmn-dev/scoop
88+
- cd scoop
89+
- rm secman.json
90+
- cp ../dist/secman.json .

0 commit comments

Comments
 (0)