Skip to content

Commit

Permalink
Update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
CyrilleB79 committed Nov 21, 2024
1 parent 71dd08a commit 65a72a3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python 3.7
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.7
- name: Install dependencies
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
result-encoding: string
- name: Cache NVDA
id: cache-nvda
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: download
key: ${{ runner.os }}-nvda_launcher-${{matrix.nvda-release}}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build_addon.yml.old
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- run: echo -e "pre-commit\nscons\nmarkdown">requirements.txt

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.9
cache: 'pip'
Expand Down Expand Up @@ -50,14 +50,14 @@ jobs:
if: ${{ startsWith(github.ref, 'refs/tags/') }}
needs: ["build"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: download releases files
uses: actions/download-artifact@v4
- name: Display structure of downloaded files
run: ls -R

- name: Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: packaged_addon/*.nvda-addon
fail_on_unmatched_files: true
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/upload-on-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set my timezone # Useful when I push a release tag containing the date of today.
uses: szenius/set-timezone@v1.1
uses: szenius/set-timezone@v2.0
with:
timezoneLinux: "Europe/Paris"
#- name: Test timezone
# run: date +"%Z %z"
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
Expand All @@ -38,7 +38,9 @@ jobs:
print(f'===> Version:{version}')
pattern = rf'## Change log.*### Version {version}\s*(.*?)\s*(\n(### Version)|(\[\d+\]:)|$)'
fileContent = open('readme.md', 'r', encoding='utf8').read()
changeLog = re.search(pattern, fileContent, re.DOTALL).group(1) + '\n'
match = re.search(pattern, fileContent, re.DOTALL)
changeLog = match.group(1) if match else ""
changeLog += '\n'
print(f'===> ChangeLog:\n<<<{changeLog}>>>\n')
open('changelog.md', 'w', encoding='utf-8').write(changeLog)
shell: python
Expand All @@ -48,7 +50,7 @@ jobs:
- name: Calculate sha256
run: sha256sum *.nvda-addon >> changelog.md
- name: Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down

0 comments on commit 65a72a3

Please sign in to comment.