-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only ship on tag, create release with installer download
- Loading branch information
Showing
1 changed file
with
12 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,18 +2,15 @@ name: "Build and ship package" | |
|
||
on: | ||
push: | ||
branches: | ||
- "maartenberg/ship-on-tag" | ||
- "development" | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
build: | ||
runs-on: "ubuntu-latest" | ||
|
||
steps: | ||
- uses: "actions/checkout@v2" | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: "Use appropriate Node.js" | ||
uses: "actions/setup-node@v2" | ||
|
@@ -33,15 +30,14 @@ jobs: | |
name: "package" | ||
path: "dist/installers/*.deb" | ||
|
||
- run: "mkdir -p ~/.ssh" | ||
- run: "echo \"$sshkey\" > ~/.ssh/id_ed25519" | ||
- name: Create release | ||
uses: softprops/action-gh-release@v1 | ||
env: | ||
sshkey: "${{ secrets.FREIGHT_KEY_PROD }}" | ||
|
||
- run: "chmod 0600 ~/.ssh/id_ed25519" | ||
|
||
- name: "Copy package to server" | ||
run: "scp -o StrictHostKeyChecking=no dist/installers/*.deb [email protected]:/tmp/new_sloth.deb" | ||
|
||
- name: "Add package to freight" | ||
run: "ssh -o StrictHostKeyChecking=no [email protected] <<< 'freight add /tmp/new_sloth.deb apt/focal; freight cache; rm -v /tmp/new_sloth.deb'" | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref_name }} | ||
draft: false | ||
prerelease: false | ||
generate_release_notes: true | ||
files: | | ||
dist/installers/*.deb |