oh-my-posh/.github/workflows/android.yml
dependabot[bot] 67e91f8657 chore(deps): bump actions/checkout from 3.6.0 to 4.0.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.6.0 to 4.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](f43a0e5ff2...3df4ab11eb)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-05 00:43:51 +00:00

37 lines
1.3 KiB
YAML

name: Android
on:
release:
types: [published]
jobs:
build-android:
runs-on: ubuntu-latest
container: ghcr.io/jandedobbeleer/golang-android-container:latest
steps:
- name: Checkout code 👋
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- name: Build
run: |
VERSION=$(echo "${{ github.event.release.name }}" | cut -c2-)
echo "Building version ${VERSION}"
cd src
go build -o dist/posh-android-arm -ldflags="-s -w -X 'github.com/jandedobbeleer/oh-my-posh/src/build.Version=${VERSION}' -X 'github.com/jandedobbeleer/oh-my-posh/src/build.Date=$(date)'"
- name: Upload artifacts 🆙
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
console.log('environment', process.versions);
const fs = require('fs').promises;
const { repo: { owner, repo }, sha } = context;
console.log({ owner, repo, sha });
await github.rest.repos.uploadReleaseAsset({
owner, repo,
release_id: ${{ github.event.release.id }},
name: 'posh-android-arm',
data: await fs.readFile('./src/dist/posh-android-arm')
});