@@ -1254,7 +1254,7 @@ jobs:
12541254 name : chromium-arm
12551255 - name : Publish release
12561256 id : publish
1257- uses : softprops/action-gh-release@v1
1257+ uses : softprops/action-gh-release@v2
12581258 with :
12591259 fail_on_unmatched_files : true
12601260 files : |
@@ -1263,17 +1263,63 @@ jobs:
12631263 assets : ${{ steps.publish.outputs.assets }}
12641264 publish-winget :
12651265 needs : publish-release
1266- runs-on : windows-2022
1266+ runs-on : ubuntu-slim
12671267 steps :
1268- - name : Checkout
1268+ - name : Get version
1269+ id : version
1270+ run : echo "version=$(echo '${{ github.ref_name }}' | cut -d'-' -f1)" >> $GITHUB_OUTPUT
1271+ - uses : vedantmgoyal9/winget-releaser@main
1272+ with :
1273+ identifier : eloston.ungoogled-chromium
1274+ token : ${{ secrets.PAT }}
1275+ installers-regex : .(exe|zip)$
1276+ version : ${{ steps.version.outputs.version }}
1277+ fork-user : Nifury
1278+ update-binaries :
1279+ needs : publish-release
1280+ runs-on : ubuntu-latest
1281+ steps :
1282+ - name : Checkout ungoogled-chromium-windows
1283+ uses : actions/checkout@v3
1284+ with :
1285+ path : ungoogled-chromium-windows
1286+ - name : Checkout ungoogled-chromium-binaries
12691287 uses : actions/checkout@v3
1270- - name : Setup Stage
1271- run : npm install
1272- working-directory : ./.github/actions/winget
1273- - name : Run Stage
1274- id : stage
1275- uses : ./.github/actions/winget
12761288 with :
1289+ repository : Nifury/ungoogled-chromium-binaries
12771290 token : ${{ secrets.PAT }}
1278- version : ${{ github.ref_name }}
1279- assets : ${{ needs.publish-release.outputs.assets }}
1291+ path : ungoogled-chromium-binaries
1292+ - name : Rebase onto upstream master
1293+ working-directory : ungoogled-chromium-binaries
1294+ run : |
1295+ git remote add upstream https://github.com/ungoogled-software/ungoogled-chromium-binaries.git
1296+ git fetch upstream
1297+ git rebase upstream/master
1298+ - name : Set up Python 3.12
1299+ uses : actions/setup-python@v5
1300+ with :
1301+ python-version : ' 3.12'
1302+ - name : Install dependencies
1303+ run : pip install requests
1304+ - name : Run gen.py
1305+ working-directory : ungoogled-chromium-binaries
1306+ run : python ../ungoogled-chromium-windows/.github/scripts/gen.py
1307+ - name : Commit and push
1308+ working-directory : ungoogled-chromium-binaries
1309+ run : |
1310+ git config user.name "github-actions"
1311+ git config user.email "github-actions@github.com"
1312+ git add config/platforms/windows/
1313+ git commit -m "Update Windows binaries for ${{ github.ref_name }}"
1314+ git push --force-with-lease
1315+ - name : Create pull request
1316+ working-directory : ungoogled-chromium-binaries
1317+ run : |
1318+ gh pr create \
1319+ --repo ungoogled-software/ungoogled-chromium-binaries \
1320+ --head Nifury:master \
1321+ --base master \
1322+ --title "Update Windows binaries for ${{ github.ref_name }}" \
1323+ --body "Automated update of Windows binary hashes for release ${{ github.ref_name }}."
1324+ env :
1325+ GH_TOKEN : ${{ secrets.PAT }}
0 commit comments