Skip to content

Update main.yml

Update main.yml #45

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Setup Python 🏭
uses: actions/setup-python@v4
with:
check-latest: true
python-version: '3.x'
- name: Install Ubuntu Dependencies 🧑‍🏭
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: e2fsprogs attr unzip qemu-utils python3-venv
version: 1.0
- name: Install Python dependencies
run:
pip install requests
- name: Download
id: download
run: |
cd ${{ github.workspace }}
ls -R
result=$(head -n 1 UpdateID.cfg | sed 's/[[:space:]]*$//')
echo "$result" >> $GITHUB_OUTPUT
python3 Download.py
ls -R
- name: upload result
id: result
uses: actions/upload-artifact@v1
with:
name: MicrosoftCorporationII.WindowsSubsystemForAndroid_${{ steps.download.outputs.Version }}_neutral_~_8wekyb3d8bbwe.Msixbundle
path: ${{ github.workspace }}/output/MicrosoftCorporationII.WindowsSubsystemForAndroid_${{ steps.download.outputs.Version }}_neutral_~_8wekyb3d8bbwe.Msixbundle
- name: File Checksum ✔️
id: checkhash
run: |
$hash = Get-FileHash ${{ github.workspace }}/output/MicrosoftCorporationII.WindowsSubsystemForAndroid_${{ steps.download.outputs.Version }}_neutral_~_8wekyb3d8bbwe.Msixbundle | Select-Object -ExpandProperty Hash
$hash = $hash.ToLower()
("hash=" + $hash) >> $env:GITHUB_OUTPUT
- name: Update build to release 🤌
uses: softprops/[email protected]
with:
files: ${{ github.workspace }}/output/MicrosoftCorporationII.WindowsSubsystemForAndroid_${{ steps.download.outputs.Version }}_neutral_~_8wekyb3d8bbwe.Msixbundle
fail_on_unmatched_files: true
append_body: true
tag_name: ${{ steps.download.outputs.Version }}
body: ${{ steps.checkhash.outputs.hash }} MicrosoftCorporationII.WindowsSubsystemForAndroid_${{ steps.download.outputs.Version }}_neutral_~_8wekyb3d8bbwe.Msixbundle
token: ${{ secrets.GITHUB_TOKEN }}