Skip to content

Commit 43daa1e

Browse files
author
Jan Nielsen
committed
update workflows (to be "same" as in the base repo
1 parent 8c4c132 commit 43daa1e

File tree

3 files changed

+87
-46
lines changed

3 files changed

+87
-46
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,36 @@ name: CI
33
on:
44
push:
55
branches:
6-
- master
6+
- master
77
pull_request:
88
branches:
99
- master
10+
permissions:
11+
contents: read
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
14+
cancel-in-progress: true
1015
jobs:
1116
build:
1217
strategy:
1318
fail-fast: false
14-
runs-on: windows-2022
19+
runs-on: windows-latest
1520
steps:
16-
- name: Checkout
17-
uses: actions/checkout@v2
18-
with:
19-
fetch-depth: 0
20-
- name: Build and Test
21-
run: ./Build.ps1
22-
shell: pwsh
23-
- name: Push to MyGet
24-
env:
25-
NUGET_URL: https://www.myget.org/F/automapperdev/api/v3/index.json
26-
NUGET_API_KEY: ${{ secrets.MYGET_CI_API_KEY }}
27-
run: ./Push.ps1
28-
shell: pwsh
29-
- name: Artifacts
30-
uses: actions/upload-artifact@v2
31-
with:
32-
name: artifacts
33-
path: artifacts/**/*
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
- name: Build and Test
26+
run: ./Build.ps1
27+
shell: pwsh
28+
- name: Push to MyGet
29+
env:
30+
NUGET_URL: https://www.myget.org/F/automapperdev/api/v3/index.json
31+
NUGET_API_KEY: ${{ secrets.MYGET_CI_API_KEY }}
32+
run: ./Push.ps1
33+
shell: pwsh
34+
- name: Artifacts
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: artifacts
38+
path: artifacts/**/*

.github/workflows/lock.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: 'Lock threads'
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 0'
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
lock:
13+
permissions:
14+
issues: write # for dessant/lock-threads to lock issues
15+
pull-requests: write # for dessant/lock-threads to lock PRs
16+
discussions: write # for dessant/lock-threads to lock discussions
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: dessant/lock-threads@v5
20+
with:
21+
issue-inactive-days: 31
22+
pr-inactive-days: 31
23+
discussion-inactive-days: 31
24+
issue-comment: >
25+
This issue has been automatically locked since there
26+
has not been any recent activity after it was closed.
27+
Please open a new issue for related bugs.
28+
pr-comment: >
29+
This pull request has been automatically locked since there
30+
has not been any recent activity after it was closed.
31+
discussion-comment: >
32+
This discussion has been automatically locked since there
33+
has not been any recent activity after it was closed.

.github/workflows/release.yml

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,37 @@ name: Release
33
on:
44
push:
55
tags:
6-
- '*.*.*'
6+
- '*.*.*'
7+
permissions:
8+
contents: read
9+
710
jobs:
811
build:
912
strategy:
1013
fail-fast: false
11-
runs-on: windows-2022
14+
runs-on: windows-latest
1215
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v2
15-
with:
16-
fetch-depth: 0
17-
- name: Build and Test
18-
run: ./Build.ps1
19-
shell: pwsh
20-
- name: Push to MyGet
21-
env:
22-
NUGET_URL: https://www.myget.org/F/automapperdev/api/v3/index.json
23-
NUGET_API_KEY: ${{ secrets.MYGET_CI_API_KEY }}
24-
run: ./Push.ps1
25-
shell: pwsh
26-
- name: Push to NuGet
27-
env:
28-
NUGET_URL: https://api.nuget.org/v3/index.json
29-
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
30-
run: ./Push.ps1
31-
shell: pwsh
32-
- name: Artifacts
33-
uses: actions/upload-artifact@v2
34-
with:
35-
name: artifacts
36-
path: artifacts/**/*
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
- name: Build and Test
21+
run: ./Build.ps1
22+
shell: pwsh
23+
- name: Push to MyGet
24+
env:
25+
NUGET_URL: https://www.myget.org/F/automapperdev/api/v3/index.json
26+
NUGET_API_KEY: ${{ secrets.MYGET_CI_API_KEY }}
27+
run: ./Push.ps1
28+
shell: pwsh
29+
- name: Push to NuGet
30+
env:
31+
NUGET_URL: https://api.nuget.org/v3/index.json
32+
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
33+
run: ./Push.ps1
34+
shell: pwsh
35+
- name: Artifacts
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: artifacts
39+
path: artifacts/**/*

0 commit comments

Comments
 (0)