Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Finish post
  • Loading branch information
AlecKazakova committed Jan 24, 2020
1 parent f49b997 commit 962a366
Show file tree
Hide file tree
Showing 26 changed files with 87 additions and 116 deletions.
34 changes: 3 additions & 31 deletions config.toml
Expand Up @@ -3,7 +3,7 @@ languageCode = "en" # website language
defaultContentLanguage = "en" # [en, zh, ...] determines which i18n file to use
title = "AlecStrong" # website title
theme = "LoveIt" # theme
enableGitInfo = false # whether to use git commit log to generate lastmod record
enableGitInfo = true # whether to use git commit log to generate lastmod record
hasCJKLanguage = false # whether to include chinese/japanese/korean
paginate = 12 # default amount of posts in each pages
enableEmoji = true # whether to use emoji code
Expand Down Expand Up @@ -53,42 +53,14 @@ staticDir = ["static", "../assets/others"] # static directories
socialShare = true # whether to show social share links in post page

#### Footer CopyRight Info
since = 2018 # Site creation time
since = 2020 # Site creation time
icp = '' # ICP info only in China (HTML format is allowed)
license= '<a rel="license external nofollow noopener noreffer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a>'
# license info (HTML format is allowed)
gitRepo = "" # public git repo url to link lastmod git commit only then enableGitInfo is true
gitRepo = "https://github.com/alecstrong/alecstrong.com"

linkToMarkdown = true # whether to show link to Raw Markdown content of the post

#### site verification code for Google/Bing/Yandex/Pinterest/Baidu
google_verification = ""
bing_verification = ""
yandex_verification = ""
pinterest_verification = ""
baidu_verification = ""

[params.cdn] #### CSS and JS Files CDN
fontawesome_free_css = '' # for example '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.10.1/css/all.min.css" integrity="sha256-fdcFNFiBMrNfWL6OcAGQz6jDgNTRxnrLEd4vJYFWScE=" crossorigin="anonymous">'
animate_css = ''
gitalk_css = ''
gitalk_js = ''
valine_js = ''
jquery_js = ''
lazysizes_js = ''
smooth_scroll_js = ''
katex_css = ''
katex_js = ''
katex_auto_render_js = ''
mermaid_js = ''
echarts_js = ''
echarts_macarons_js = ''
typeit_js = ''
jquery_countdown_js = ''
aplayer_css = ''
aplayer_js = ''
meting_js = ''

[params.gravatar] # Gravatar Info for preferred avatar in home page
email = "anstrong22@gmail.com"

Expand Down
28 changes: 13 additions & 15 deletions content/posts/github-actions-mpp.md
Expand Up @@ -4,12 +4,12 @@ date: 2020-01-23T20:57:46-05:00
draft: false
---

With Kotlin Multiplatform (kmp) it's possible to build artifacts for multiple platforms using the same toolchain,
but until portable artifacts for kmp are released you need to build platform artifacts on
With Kotlin Multiplatform (KMP) it's possible to build artifacts for multiple platforms using the same toolchain,
but until portable artifacts for KMP are released you need to build platform artifacts on
their respective platforms.

With SqlDelight 1.2.2 we now also deploy windows (mingW) artifacts, meaning it's impossible to publish
from a single OS (since we also support macOS targets). There was no simple setup with travis and github actions
With SqlDelight 1.2.2 we now also deploy Windows (mingW) artifacts, meaning it's impossible to publish
from a single OS (since we also support macOS targets). There was no simple setup with Travis and Github Actions
is the new hot stuff so we gave that a go and here's how it works:

### Continuous Integration
Expand All @@ -25,10 +25,10 @@ on:
- '*.md'
```

It ignores changes to documentation meaning PRs that only touch the ignored files immediately go gree. Dope!
It ignores changes to documentation meaning PRs that only touch the ignored files immediately go green. Dope!

In a workflow file you specify a series of jobs that happen when the workflow is triggered, and you can use
this to boot up all the different OS you target for kmp. You can do it by specifying multiple jobs (one for each OS)
this to boot up all the different OS's you target for KMP. You can do it by specifying multiple jobs (one for each OS)
or using a build matrix which is what we do.

```yaml
Expand Down Expand Up @@ -79,11 +79,11 @@ work is done for you!
### Continuous Deployment

The more challenging bit is configuring releases. To do this we have a single workflow [Release](https://github.com/cashapp/sqldelight/blob/master/.github/workflows/Release.yml)
which publishes the artifacts and intellij plugin - both for official releases and snapshots.
which publishes the artifacts and IntelliJ plugin - both for official releases and snapshots.

To facilitate releasing you need to give github some
To facilitate releasing you need to give Github some
[secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets) - your
sonatype username/password and a gpg key, and then expose those to the workflow job step which runs the publish:
Sonatype username/password and a GPG key, and then expose those to the workflow job step which runs the publish:

```yaml
- name: Publish the windows artifact
Expand All @@ -94,7 +94,7 @@ sonatype username/password and a gpg key, and then expose those to the workflow
run: ./gradlew publishMingwPublicationToMavenRepository
```

The gpg key you add to github settings should be an ascii-armored version of the key which you can get
The GPG key you add to Github settings should be an ascii-armored version of the key which you can get
by running `gpg --export --ascii <keyid> | pbcopy` in your console. If you're using gradle's signing plugin
(if you're not sure, you probably are) it needs to be configured to use the ascii armored key.

Expand All @@ -118,14 +118,12 @@ signing {
}
```

The kmp gradle plugin is smart enough to not try and build/publish for unsupported architectures, so we just let the macOS
job publish all the artifacts it can, and then windows only tries to publish the mingW publications.
The KMP Gradle plugin is smart enough to not try and build/publish for unsupported architectures, so we just let the macOS
job publish all the artifacts it can, and then Windows only tries to publish the mingW publications.

---

And thats it! We also have a workflow to [deploy gh-pages with mkdocs](https://github.com/cashapp/sqldelight/blob/master/.github/workflows/Publish-Website.yml)
and a job which [publishes the intellij plugin](https://github.com/cashapp/sqldelight/blob/master/.github/workflows/Release.yml#L37-L47). With Github Actions
and a job which [publishes the IntelliJ plugin](https://github.com/cashapp/sqldelight/blob/master/.github/workflows/Release.yml#L37-L47). With Github Actions
we've been able to shrink the actual releasing process [pretty dramatically](https://github.com/cashapp/sqldelight/commit/5acee5551bd1c6a19233ed4b32c0c7bb445faff2)
and I'm looking forward to using it more!

[@strongolopolis](https://twitter.com/Strongolopolis)
2 changes: 1 addition & 1 deletion content/talks.md
Expand Up @@ -7,7 +7,7 @@ showReadingTime: false

2019-12-16 __[Shipping a mobile multiplatform project on iOS & Android](../mytalks/sammpoia)__ _(kotlinconf 2019, Copenhagen Denmark)_

2019-09-27 __[Good APIs Don't Need a Tutorial](../mytalks/gadnat)__ _(Droidcon NYC 2019, NYC)
2019-09-27 __[Good APIs Don't Need a Tutorial](../mytalks/gadnat)__ _(Droidcon NYC 2019, NYC)_

2018-10-05 __[What's the big IDEA? Writing IntelliJ plugins for Kotlin](../mytalks/wtbiwipfk)__ _(Kotlinconf 2018, Amsterdam)_

Expand Down
41 changes: 20 additions & 21 deletions public/2020/01/github-actions-mpp/index.html
Expand Up @@ -17,8 +17,8 @@
<meta name="theme-color" content="#ffffff">
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Integrating Github Actions for Kotlin Multiplatform"/>
<meta name="twitter:description" content="With Kotlin Multiplatform (kmp) it&#39;s possible to build artifacts for multiple platforms using the same toolchain, but until portable artifacts for kmp are released you need to build platform artifacts on their respective platforms.
With SqlDelight 1.2.2 we now also deploy windows (mingW) artifacts, meaning it&#39;s impossible to publish from a single OS (since we also support macOS targets). There was no simple setup with travis and github actions is the new hot stuff so we gave that a go and here&#39;s how it works:"/>
<meta name="twitter:description" content="With Kotlin Multiplatform (KMP) it&#39;s possible to build artifacts for multiple platforms using the same toolchain, but until portable artifacts for KMP are released you need to build platform artifacts on their respective platforms.
With SqlDelight 1.2.2 we now also deploy Windows (mingW) artifacts, meaning it&#39;s impossible to publish from a single OS (since we also support macOS targets). There was no simple setup with Travis and Github Actions is the new hot stuff so we gave that a go and here&#39;s how it works:"/>
<script type="application/ld+json">
{
"@context": "http://schema.org",
Expand All @@ -31,13 +31,13 @@

"genre": "posts",

"wordcount": 687 ,
"wordcount": 686 ,
"url": "https:\/\/alecstrong.com\/2020\/01\/github-actions-mpp\/",

"datePublished": "2020-01-23T20:57:46-05:00",


"dateModified": "2020-01-23T20:57:46-05:00",
"dateModified": "2020-01-24T09:03:14-05:00",


"license": "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.",
Expand Down Expand Up @@ -112,7 +112,7 @@ <h1 class="post-title animated flipInX">Integrating Github Actions for Kotlin Mu
</div>
<div class="post-meta-other">
<i class="far fa-calendar-alt fa-fw"></i><time datetime=2020-01-23>2020-01-23</time>&nbsp;
<i class="fas fa-pencil-alt fa-fw"></i>about 687 words&nbsp;
<i class="fas fa-pencil-alt fa-fw"></i>about 686 words&nbsp;
<i class="far fa-clock fa-fw"></i>4 min&nbsp;</div>
</div>

Expand Down Expand Up @@ -146,11 +146,11 @@ <h1 class="post-title animated flipInX">Integrating Github Actions for Kotlin Mu



<p>With Kotlin Multiplatform (kmp) it's possible to build artifacts for multiple platforms using the same toolchain,
but until portable artifacts for kmp are released you need to build platform artifacts on
<p>With Kotlin Multiplatform (KMP) it's possible to build artifacts for multiple platforms using the same toolchain,
but until portable artifacts for KMP are released you need to build platform artifacts on
their respective platforms.</p>
<p>With SqlDelight 1.2.2 we now also deploy windows (mingW) artifacts, meaning it's impossible to publish
from a single OS (since we also support macOS targets). There was no simple setup with travis and github actions
<p>With SqlDelight 1.2.2 we now also deploy Windows (mingW) artifacts, meaning it's impossible to publish
from a single OS (since we also support macOS targets). There was no simple setup with Travis and Github Actions
is the new hot stuff so we gave that a go and here's how it works:</p>
<a class="post-dummy-target" id="continuous-integration"></a><h3>Continuous Integration</h3>
<p>Github Actions is configured through yaml files, each one describing a specific workflow. For CI we have a few workflows but the main one
Expand All @@ -171,9 +171,9 @@ <h1 class="post-title animated flipInX">Integrating Github Actions for Kotlin Mu
</span><span class="w"> </span>-<span class="w"> </span><span class="s1">&#39;*.md&#39;</span><span class="w">
</span></code></pre></td></tr></table>
</div>
</div><p>It ignores changes to documentation meaning PRs that only touch the ignored files immediately go gree. Dope!</p>
</div><p>It ignores changes to documentation meaning PRs that only touch the ignored files immediately go green. Dope!</p>
<p>In a workflow file you specify a series of jobs that happen when the workflow is triggered, and you can use
this to boot up all the different OS you target for kmp. You can do it by specifying multiple jobs (one for each OS)
this to boot up all the different OS's you target for KMP. You can do it by specifying multiple jobs (one for each OS)
or using a build matrix which is what we do.</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
Expand Down Expand Up @@ -248,10 +248,10 @@ <h1 class="post-title animated flipInX">Integrating Github Actions for Kotlin Mu
work is done for you!</p>
<a class="post-dummy-target" id="continuous-deployment"></a><h3>Continuous Deployment</h3>
<p>The more challenging bit is configuring releases. To do this we have a single workflow <a href="https://github.com/cashapp/sqldelight/blob/master/.github/workflows/Release.yml">Release</a>
which publishes the artifacts and intellij plugin - both for official releases and snapshots.</p>
<p>To facilitate releasing you need to give github some
which publishes the artifacts and IntelliJ plugin - both for official releases and snapshots.</p>
<p>To facilitate releasing you need to give Github some
<a href="https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets">secrets</a> - your
sonatype username/password and a gpg key, and then expose those to the workflow job step which runs the publish:</p>
Sonatype username/password and a GPG key, and then expose those to the workflow job step which runs the publish:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
Expand All @@ -270,7 +270,7 @@ <h1 class="post-title animated flipInX">Integrating Github Actions for Kotlin Mu
</span><span class="w"> </span>run<span class="p">:</span><span class="w"> </span>./gradlew<span class="w"> </span>publishMingwPublicationToMavenRepository<span class="w">
</span></code></pre></td></tr></table>
</div>
</div><p>The gpg key you add to github settings should be an ascii-armored version of the key which you can get
</div><p>The GPG key you add to Github settings should be an ascii-armored version of the key which you can get
by running <code>gpg --export --ascii &lt;keyid&gt; | pbcopy</code> in your console. If you're using gradle's signing plugin
(if you're not sure, you probably are) it needs to be configured to use the ascii armored key.</p>
<div class="highlight"><div class="chroma">
Expand Down Expand Up @@ -313,22 +313,21 @@ <h1 class="post-title animated flipInX">Integrating Github Actions for Kotlin Mu
<span class="o">}</span>
</code></pre></td></tr></table>
</div>
</div><p>The kmp gradle plugin is smart enough to not try and build/publish for unsupported architectures, so we just let the macOS
job publish all the artifacts it can, and then windows only tries to publish the mingW publications.</p>
</div><p>The KMP Gradle plugin is smart enough to not try and build/publish for unsupported architectures, so we just let the macOS
job publish all the artifacts it can, and then Windows only tries to publish the mingW publications.</p>
<hr>
<p>And thats it! We also have a workflow to <a href="https://github.com/cashapp/sqldelight/blob/master/.github/workflows/Publish-Website.yml">deploy gh-pages with mkdocs</a>
and a job which <a href="https://github.com/cashapp/sqldelight/blob/master/.github/workflows/Release.yml#L37-L47">publishes the intellij plugin</a>. With Github Actions
and a job which <a href="https://github.com/cashapp/sqldelight/blob/master/.github/workflows/Release.yml#L37-L47">publishes the IntelliJ plugin</a>. With Github Actions
we've been able to shrink the actual releasing process <a href="https://github.com/cashapp/sqldelight/commit/5acee5551bd1c6a19233ed4b32c0c7bb445faff2">pretty dramatically</a>
and I'm looking forward to using it more!</p>
<p><a href="https://twitter.com/Strongolopolis">@strongolopolis</a></p>

</div>

<div class="post-footer" id="post-footer">
<div class="post-info">
<div class="post-info-line">
<div class="post-info-mod">
<span>This article is updated with 2020-01-23</span>
<span>This article is updated with 2020-01-24</span>
</div>
<div class="post-info-license">

Expand Down Expand Up @@ -398,7 +397,7 @@ <h1 class="post-title animated flipInX">Integrating Github Actions for Kotlin Mu
Powered by <a href="https://gohugo.io/" target="_blank" rel="external nofollow noopener noreffer">Hugo</a>&nbsp;|&nbsp;Theme - <a href="https://github.com/dillonzq/LoveIt" target="_blank" rel="external nofollow noopener noreffer">LoveIt<i class="far fa-heart fa-fw"></i></a>
</div>
<div class="copyright-line">
<i class="far fa-copyright fa-fw"></i><span itemprop="copyrightYear">2018 - 2020</span><span class="author" itemprop="copyrightHolder">&nbsp;<a href="https://alecstrong.com/">Alec Strong</a></span><span class="license">&nbsp;|&nbsp;<a rel="license external nofollow noopener noreffer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a></span></div>
<i class="far fa-copyright fa-fw"></i><span itemprop="copyrightYear">2020</span><span class="author" itemprop="copyrightHolder">&nbsp;<a href="https://alecstrong.com/">Alec Strong</a></span><span class="license">&nbsp;|&nbsp;<a rel="license external nofollow noopener noreffer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a></span></div>
</div>
</footer>

Expand Down

0 comments on commit 962a366

Please sign in to comment.