Skip to content

Commit

Permalink
fixup! Adding winget workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ldennington committed Nov 4, 2021
2 parents 92c5052 + 512de05 commit b739147
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 61 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/release-apt-get.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,4 @@ jobs:
env:
RELEASE: ${{ github.event.inputs.release }}
run: |
for id in ${{ secrets.BIONIC_REPO_ID }} ${{ secrets.HIRSUTE_REPO_ID }}
do
repoclient -v v3 -c config.json package add --check --wait 300 "${{steps.get-asset.outputs.name}}" -r $id
done
repoclient -v v3 -c config.json package add --check --wait 300 ${{steps.get-asset.outputs.name}} -r ${{ secrets.HIRSUTE_REPO_ID }}
46 changes: 15 additions & 31 deletions .github/workflows/release-winget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,19 @@ on:

jobs:
release:
runs-on: ubuntu-latest
runs-on: windows-latest
steps:
- id: update-winget
name: Update winget repository
uses: mjcheetham/update-winget@v1.4
with:
id: Microsoft.Git
token: ${{ secrets.WINGET_TOKEN }}
releaseAsset: Git-([0-9.vfs]*)\-64-bit.exe
manifestText: |
PackageIdentifier: {{id}}
PackageVersion: {{version:s/\.[A-Za-z]+\././}}
PackageName: Microsoft Git
Publisher: The Git Client Team at GitHub
Moniker: microsoft-git
PackageUrl: https://aka.ms/ms-git
Tags:
- microsoft-git
License: GPLv2
ShortDescription: |
Git distribution to support monorepo scenarios.
Note: This is not Git for Windows. Unless you are working in a monorepo and require
specific Git modifications, please run `winget install git` to start using Git for Windows.
Installers:
- Architecture: x64
InstallerUrl: {{url}}
InstallerType: inno
InstallerSha256: {{sha256}}
PackageLocale: en-US
ManifestType: singleton
ManifestVersion: 1.0.0
alwaysUsePullRequest: true
- name: Publish manifest with winget-create
run: |
# Get correct release asset
$github = Get-Content '${{ github.event_path }}' | ConvertFrom-Json
$asset = $github.release.assets | Where-Object -Property name -match '.exe$'
# Remove 'v' and 'vfs' from the version
$assets.tag_name -match '\d.*'
$version = $Matches[0] -replace ".vfs",""
# Download and run wingetcreate
Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
.\wingetcreate.exe update Microsoft.Git -u $asset.browser_download_url -v $version --o manifests -t "${{ secrets.WINGET_TOKEN }}" -s
shell: powershell
36 changes: 10 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,30 +113,8 @@ Or you can run the `git update-microsoft-git` command, which will run those

## Linux

`apt-get` support is available for Ubuntu Bionic Beaver (18.04) and Hirsute
Hippo (21.04). Take the following steps to set up and install based on the
version you are running:

### Ubuntu 18.04 (Bionic)

```shell
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
sudo apt-add-repository https://packages.microsoft.com/ubuntu/18.04/prod
sudo apt-get update
sudo apt-get install microsoft-git
```

To upgrade `microsoft/git`, you can run the necessary `apt-get` commands:

```shell
sudo apt-get update
sudo apt-get upgrade microsoft-git
```

Or you can run the `git update-microsoft-git` command, which will run those
`apt-get` commands for you.

### Ubuntu 21.04 (Hirsute)
`apt-get` support is available for Ubuntu Hirsute
Hippo (21.04). Take the following steps to set up and install:

```shell
curl -sSL https://packages.microsoft.com/config/ubuntu/21.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft-prod.list
Expand All @@ -157,7 +135,7 @@ Or you can run the `git update-microsoft-git` command, which will run those

### Other Ubuntu/Debian distributions

Please use the most recent
On newer distributions*, you may use the most recent
[`.deb` package](https://github.com/microsoft/git/releases). For example,
you can download a specific version as follows:

Expand All @@ -176,7 +154,13 @@ scalar version

To upgrade, you will need to repeat these steps to reinstall.

### Non-Ubuntu/Debian distributions
*Older distributions are missing some required dependencies. Even
though the package may appear to install successfully, `microsoft/
git` will not function as expected. If you are running Ubuntu 18.04 or
older, please follow the install from source instructions below
instead of installing the debian package.

### Other distributions

You will need to compile and install `microsoft/git` from source:

Expand Down

0 comments on commit b739147

Please sign in to comment.