Skip to content

Commit

Permalink
Automation Polishing
Browse files Browse the repository at this point in the history
Add master to workflow builds
Strip before release, only ARM requirement, upload github workspace
Recusive checkout clone, source tarball
Remove .git and .github folders
Removing .gitmodules as well, need folder name in tarball
Removing all .git files/folders
Disable x86 strip
Fix comment positioning
Only activate release on push to master
Fix permissions for workflow
Toggle on pushes only to master
  • Loading branch information
jerinphilip committed Jan 31, 2022
1 parent 0ae4cbb commit 25a1724
Showing 1 changed file with 29 additions and 5 deletions.
34 changes: 29 additions & 5 deletions .github/workflows/moz-target.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: "Strip for gecko-dev"
push:
branches:
- main
- master
tags:
- "v*.*.*"
pull_request:
Expand All @@ -22,6 +23,7 @@ jobs:
x86:
name: "x86"
runs-on: "ubuntu-latest"
if: false
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -186,11 +188,33 @@ jobs:
release-latest:
name: Release Latest Build
runs-on: ubuntu-latest
needs: [x86, arm]
# if: github.ref == 'refs/heads/master'
needs: [arm]
if: github.ref == 'refs/heads/master'
permissions:
id-token: "write"
contents: "write"
packages: "write"
pull-requests: "read"

steps:
- name: Download artifacts
uses: actions/download-artifact@v2
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive

- name: Strip unnecessary sources
run: |
bash tools/strip.sh
# Additionally remove .github only and .git folders.
- name: "Strip other files: .git, .github"
run: |
rm -rv .github
find . -iname ".git" | xargs -I% rm -rfv %
find . -iname ".gitmodules" | xargs -I% rm -rfv %
- name: Create source-tarball
run: |
(cd ../ && tar cvzf /tmp/MozIntGemm.tar.gz MozIntGemm)
- name: Update GitHub prerelease
uses: marvinpinto/action-automatic-releases@latest
Expand All @@ -200,4 +224,4 @@ jobs:
prerelease: true
title: "Latest Build"
files: |
${{github.workspace}}/artifact/*.whl
/tmp/MozIntGemm.tar.gz

0 comments on commit 25a1724

Please sign in to comment.