forked from 1b-agent/opencadstudio-upstream
Build snap from a temporary manifest
Co-authored-by: dichhead <330471626+dichhead@users.noreply.github.com>
This commit is contained in:
1 parent
b92527c956
commit
3275ffefa6
1 file changed
+8
-5
@@ -154,14 +154,18 @@ jobs:
|
|||||||
name: linux-payload
|
name: linux-payload
|
||||||
path: .
|
path: .
|
||||||
|
|
||||||
- name: Set package version
|
- name: Prepare snap project
|
||||||
id: package
|
id: package
|
||||||
env:
|
env:
|
||||||
VERSION: ${{ steps.version.outputs.version }}
|
VERSION: ${{ steps.version.outputs.version }}
|
||||||
run: |
|
run: |
|
||||||
SCRIPT=$(cat <<'EOF'
|
SCRIPT=$(cat <<'EOF'
|
||||||
test -n "$VERSION"
|
test -n "$VERSION"
|
||||||
sed -i "s/^version: .*/version: '$VERSION'/" snap/snapcraft.yaml
|
rm -rf .snap-build
|
||||||
|
mkdir -p .snap-build
|
||||||
|
cp linux-payload.tar.gz .snap-build/
|
||||||
|
cp -R snap .snap-build/
|
||||||
|
sed -i "s/^version: .*/version: '$VERSION'/" .snap-build/snap/snapcraft.yaml
|
||||||
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
@@ -170,9 +174,8 @@ jobs:
|
|||||||
- name: Build snap
|
- name: Build snap
|
||||||
id: snapcraft
|
id: snapcraft
|
||||||
uses: snapcore/action-build@v1
|
uses: snapcore/action-build@v1
|
||||||
|
with:
|
||||||
- name: Restore snap manifest
|
path: .snap-build
|
||||||
run: git checkout -- snap/snapcraft.yaml
|
|
||||||
|
|
||||||
- name: Normalize snap package name
|
- name: Normalize snap package name
|
||||||
id: snap_asset
|
id: snap_asset
|
||||||
|
|||||||
Reference in new issue
Block a user