File tree 4 files changed +50
-17
lines changed
4 files changed +50
-17
lines changed Original file line number Diff line number Diff line change 1
1
name : build
2
2
3
+ # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
4
+ permissions :
5
+ contents : read
6
+
3
7
on :
4
8
pull_request :
5
9
branches :
6
10
- ' master'
7
11
push :
8
- branches : ' master'
12
+ branches :
13
+ - ' master'
9
14
tags :
10
15
- ' *.*.*'
11
16
17
+ env :
18
+ VERSION : " 0.0.0"
19
+
12
20
jobs :
13
21
release :
14
22
runs-on : windows-latest
23
+ permissions :
24
+ # required to create GitHub release
25
+ contents : write
15
26
steps :
16
27
-
17
28
name : Prepare
18
- id : prepare
19
29
run : |
20
30
if [[ $GITHUB_REF == refs/tags/* ]]; then
21
- echo ::set-output name=version::${GITHUB_REF#refs/tags/}
22
- else
23
- echo ::set-output name=version::0.0.0
31
+ echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
24
32
fi
25
33
shell : bash
26
34
-
@@ -45,13 +53,13 @@ jobs:
45
53
version : latest
46
54
args : chocoPack
47
55
-
48
- name : Archive artifacts
49
- uses : actions/upload-artifact@v3
56
+ name : Upload artifacts
57
+ uses : actions/upload-artifact@v4
50
58
with :
51
59
name : WindowsSpyBlocker
52
60
path : |
53
61
bin/WindowsSpyBlocker.exe
54
- bin/windowsspyblocker.${{ steps.prepare.outputs.version }}.nupkg
62
+ bin/windowsspyblocker.${{ env.VERSION }}.nupkg
55
63
-
56
64
name : GitHub Release
57
65
uses : softprops/action-gh-release@v1
60
68
draft : true
61
69
files : |
62
70
bin/WindowsSpyBlocker.exe
63
- bin/windowsspyblocker.${{ steps.prepare.outputs.version }}.nupkg
64
- name : ${{ steps.prepare.outputs.version }}
65
- env :
66
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
71
+ bin/windowsspyblocker.${{ env.VERSION }}.nupkg
72
+ name : ${{ env.VERSION }}
67
73
-
68
74
name : Mage chocoPush
69
75
uses : magefile/mage-action@v2
Original file line number Diff line number Diff line change 1
1
name : docs
2
2
3
+ # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
4
+ permissions :
5
+ contents : read
6
+
3
7
on :
4
8
workflow_dispatch :
5
9
push :
20
24
jobs :
21
25
publish :
22
26
runs-on : ubuntu-latest
27
+ permissions :
28
+ # required to push to gh-pages
29
+ contents : write
23
30
steps :
24
31
-
25
32
name : Checkout
Original file line number Diff line number Diff line change 1
1
name : labels
2
2
3
+ # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
4
+ permissions :
5
+ contents : read
6
+
3
7
on :
4
8
push :
5
9
branches :
6
10
- ' master'
7
11
paths :
8
12
- ' .github/labels.yml'
9
13
- ' .github/workflows/labels.yml'
14
+ pull_request :
15
+ paths :
16
+ - ' .github/labels.yml'
17
+ - ' .github/workflows/labels.yml'
10
18
11
19
jobs :
12
20
labeler :
13
21
runs-on : ubuntu-latest
22
+ permissions :
23
+ # same as global permissions
24
+ contents : read
25
+ # required to update labels
26
+ issues : write
14
27
steps :
15
28
-
16
29
name : Checkout
17
30
uses : actions/checkout@v3
18
31
-
19
32
name : Run Labeler
20
- uses : crazy-max/ghaction-github-labeler@v4
33
+ uses : crazy-max/ghaction-github-labeler@v5
34
+ with :
35
+ dry-run : ${{ github.event_name == 'pull_request' }}
Original file line number Diff line number Diff line change 1
1
name : released
2
2
3
+ # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
4
+ permissions :
5
+ contents : read
6
+
3
7
on :
4
8
release :
5
9
types :
8
12
jobs :
9
13
virustotal :
10
14
runs-on : ubuntu-latest
15
+ permissions :
16
+ # required to write GitHub Release body
17
+ contents : write
11
18
steps :
12
19
-
13
20
name : VirusTotal Monitor Scan
14
- uses : crazy-max/ghaction-virustotal@v3
21
+ uses : crazy-max/ghaction-virustotal@v4
15
22
with :
16
23
vt_api_key : ${{ secrets.VT_MONITOR_API_KEY }}
17
24
vt_monitor : true
18
25
monitor_path : /${{ github.event.repository.name }}/${{ github.event.release.tag_name }}
19
26
update_release_body : false
20
- github_token : ${{ secrets.GITHUB_TOKEN }}
21
27
files : |
22
28
WindowsSpyBlocker.exe
23
29
-
24
30
name : VirusTotal Scan
25
- uses : crazy-max/ghaction-virustotal@v3
31
+ uses : crazy-max/ghaction-virustotal@v4
26
32
with :
27
33
vt_api_key : ${{ secrets.VT_API_KEY }}
28
34
update_release_body : true
29
- github_token : ${{ secrets.GITHUB_TOKEN }}
30
35
files : |
31
36
WindowsSpyBlocker.exe
You can’t perform that action at this time.
0 commit comments