Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Commit

Permalink
ci: update to ubuntu-20.04, removes warning
Browse files Browse the repository at this point in the history
ci: test semantic release

WIP CHARLIE
  • Loading branch information
kyranjamie committed Dec 10, 2020
1 parent 2b87267 commit bd7fcb6
Show file tree
Hide file tree
Showing 9 changed files with 192 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push]

jobs:
audit:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
Expand Down
139 changes: 130 additions & 9 deletions .github/workflows/build-release-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ name: Build/release production
on: [push]

jobs:
release:
build:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
os: [macos-latest, ubuntu-20.04, windows-latest]
include:
- os: macos-latest
NPM_COMMAND: mac

- os: ubuntu-latest
- os: ubuntu-20.04
NPM_COMMAND: linux

- os: windows-latest
Expand All @@ -25,8 +25,15 @@ jobs:
with:
access_token: ${{ secrets.GITHUB_TOKEN }}

- name: Check out Git repository
uses: actions/checkout@v1
- name: Run ID ${{ github.run_id }}
run: echo "${{ github.run_id }}"

- uses: actions/checkout@v2

- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: Variables
id: vars
Expand All @@ -52,7 +59,7 @@ jobs:
BRANCH_NAME: ${{ steps.vars.outputs.branch_name }}

- uses: actions/upload-artifact@v2
name: Upload Windows build
name: Windows upload
if: matrix.os == 'windows-latest'
with:
name: stacks-wallet-prod-${{ steps.vars.outputs.version }}-windows
Expand All @@ -61,17 +68,131 @@ jobs:
release/**/*.msi
- uses: actions/upload-artifact@v2
name: Upload MacOS build
name: MacOS upload
if: matrix.os == 'macos-latest'
with:
name: stacks-wallet-prod-${{ steps.vars.outputs.version }}-macos
path: release/**/*.dmg

- uses: actions/upload-artifact@v2
name: Upload Linux build
if: matrix.os == 'ubuntu-latest'
name: Linux upload
if: matrix.os == 'ubuntu-20.04'
with:
name: stacks-wallet-prod-${{ steps.vars.outputs.version }}-linux
path: |
release/**/*.deb
release/**/*.rpm
release:
runs-on: ubuntu-20.04

needs: build

steps:
- uses: actions/checkout@v2

- name: Run ID ${{ github.run_id }}
run: echo "${{ github.run_id }}"

- name: Semantic Release
uses: cycjimmy/semantic-release-action@v2.5.0
id: semantic
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SEMANTIC_RELEASE_PACKAGE: ${{ github.workflow }}
with:
# These plugins aren't packaged with semantic-release by default. So specify them here to ensure they get installed during this GH Action
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
semantic-release-slack-bot
@semantic-release/exec
- name: Output Semantic release variables
run: |
echo ${{ steps.semantic.outputs.new_release_version }}
echo ${{ steps.semantic.outputs.new_release_major_version }}
echo ${{ steps.semantic.outputs.new_release_minor_version }}
echo ${{ steps.semantic.outputs.new_release_patch_version }}
echo ${{ steps.semantic.outputs.new_release_channel }}
echo ${{ steps.semantic.outputs.new_release_notes }}
- uses: actions/download-artifact@v2
with:
path: release/

- run: ls -la release

# - name: Create Release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: v${{ steps.semantic.outputs.release-version }}
# release_name: Release ${{ steps.semantic.outputs.release-version }}
# draft: false
# prerelease: true
# body: |
# **stacks-wallet-4.0.0-beta.8.msi**
# `${{ hashFiles('./release/stacks-wallet-prod-4.0.0-beta.8-windows/stacks-wallet-4.0.0-beta.8.msi') }}`

# **stacks-wallet-4.0.0-beta.8.dmg**
# `${{ hashFiles('./release/stacks-wallet-prod-4.0.0-beta.8-macos/stacks-wallet-4.0.0-beta.8.dmg') }}`

# **stacks-wallet-4.0.0-beta.8.rpm**
# `${{ hashFiles('./release/stacks-wallet-prod-4.0.0-beta.8-linux/stacks-wallet-4.0.0-beta.8.rpm') }}`

# **stacks-wallet-4.0.0-beta.8.deb**
# `${{ hashFiles('./release/stacks-wallet-prod-4.0.0-beta.8-linux/stacks-wallet-4.0.0-beta.8.deb') }}`

- name: List files
run: ls -R .

- name: Upload .msi
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./release/stacks-wallet-prod-4.0.0-beta.8-windows/stacks-wallet-4.0.0-beta.8.msi
asset_name: stacks-wallet-4.0.0-beta.8.msi
asset_content_type: application/octet-stream

- name: Upload .dmg
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./release/stacks-wallet-prod-4.0.0-beta.8-macos/stacks-wallet-4.0.0-beta.8.dmg
asset_name: stacks-wallet-4.0.0-beta.8.dmg
asset_content_type: application/octet-stream

- name: Upload .rpm
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./release/stacks-wallet-prod-4.0.0-beta.8-linux/stacks-wallet-4.0.0-beta.8.rpm
asset_name: stacks-wallet-4.0.0-beta.8.rpm
asset_content_type: application/octet-stream

- name: Upload .deb
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./release/stacks-wallet-prod-4.0.0-beta.8-linux/stacks-wallet-4.0.0-beta.8.deb
asset_name: stacks-wallet-4.0.0-beta.8.deb
asset_content_type: application/octet-stream

# - name: Discord notification
# env:
# DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
# uses: Ilshidur/action-discord@master
# with:
# args: 'The project {{ EVENT_PAYLOAD.repository.full_name }} has been deployed.'
15 changes: 10 additions & 5 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: Build/release

on: [push, pull_request]
on: [push]

jobs:
release:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
os: [macos-latest, ubuntu-20.04, windows-latest]
include:
- os: macos-latest
NPM_COMMAND: mac

- os: ubuntu-latest
- os: ubuntu-20.04
NPM_COMMAND: linux

- os: windows-latest
Expand All @@ -35,6 +35,11 @@ jobs:
- name: Check out Git repository
uses: actions/checkout@v1

- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- uses: FranzDiebold/github-env-vars-action@v1.2.1
- name: Print environment variables
run: |
Expand Down Expand Up @@ -100,7 +105,7 @@ jobs:

- uses: actions/upload-artifact@v2
name: Upload Linux build
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-20.04'
with:
name: stacks-wallet-${{ steps.vars.outputs.version }}-linux
path: |
Expand All @@ -109,7 +114,7 @@ jobs:
- uses: lucasmotta/pull-request-sticky-header@1.0.0
# Only update it once per build
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-20.04'
with:
header: '> [Download the latest builds [${{ steps.vars.outputs.version }}]](https://github.com/blockstack/stacks-wallet/actions/runs/${{ github.run_id }}).'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push]

jobs:
lint:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/exact-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,13 @@ on: [push]

jobs:
check-versions:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v1

- name: Cache node_modules
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
run: yarn install --ignore-scripts --ignore-optional
- run: yarn add -ED @actions/core

- name: Check exact versions
uses: ./.github/actions/check-version-lock
9 changes: 7 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push]

jobs:
lint:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
Expand All @@ -13,12 +13,17 @@ jobs:
uses: actions/setup-node@v1

- name: Cache node_modules
id: cache
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
${{ runner.os }}-yarn
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn

- name: Lint eslint
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push]

jobs:
test:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
Expand All @@ -13,12 +13,17 @@ jobs:
uses: actions/setup-node@v1

- name: Cache node_modules
id: cache
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
${{ runner.os }}-yarn
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn

- name: Build prod
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push]

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
Expand Down
34 changes: 33 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@
},
"build": {
"productName": "Stacks Wallet Beta",
"appId": "org.blockstack.StacksWallet",
"appId": "org.stacks.wallet",
"icon": "./resources/icon-512x512.png",
"artifactName": "stacks-wallet-${version}.${ext}",
"files": [
"dist/",
"node_modules/",
Expand Down Expand Up @@ -92,6 +93,37 @@
]
}
},
"release": {
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
[
"@semantic-release/github",
{
"assets": [
{
"path": "dist/*.msi",
"label": "Windows distribution"
},
{
"path": "dist/*.dmg",
"label": "OSX distribution"
},
{
"path": "dist/*.rpm",
"label": "Linux distribution"
},
{
"path": "dist/*.deb",
"label": "Debian distribution"
}
]
}
],
"@semantic-release/git"
]
},
"repository": {
"type": "git",
"url": "git+https://github.com/blockstack/stacks-wallet.git"
Expand Down

0 comments on commit bd7fcb6

Please sign in to comment.